From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6768880775710375936 X-Received: by 2002:a05:6000:160d:: with SMTP id u13mr5024808wrb.22.1576002867194; Tue, 10 Dec 2019 10:34:27 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:7ec9:: with SMTP id z192ls1154972wmc.5.gmail; Tue, 10 Dec 2019 10:34:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwtnK9jXJ3Xi+LtTHG8SzxsJHFoT2YgCMcMvhHAJxc6wUXvsDSNN94VmAyc3y+9A8C3UOs3 X-Received: by 2002:a1c:6884:: with SMTP id d126mr6918080wmc.135.1576002866549; Tue, 10 Dec 2019 10:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576002866; cv=none; d=google.com; s=arc-20160816; b=tdZc00jEUGVzIziDry1xeC7pGWk3U0b66mKeSYL86bU2MdwRyzU5wzRu9RAGH+ceuN +3JxNKR/nFWaDiEzMpAVGQ2BMahY673FZswlNxmGhwbq22y2wMPMkWRxFPLGD1AFwlgk ftu/vMDXt251uqv6ML9H76EjoMNEM80ELSiN2oWzzeTFdxemAsHB2+KCefSQ60auTTlN O0JT+6f8blQrukcWKo2oBNfgbZ75CCQ5+A3JzkL1SQSmRhptgXaYk2dXW1obeTUPkRYw u0vkd3UYRxddlRtsox4qZFPyyOkIows3GjeCE96SHiJb4WFgAXs6qAPATEnVVzr8KCb5 NAsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:to:from; bh=4Wc/YzQIm39q2VfhC6KfGGf6bh2dLBnk/ZF76/Xyv5M=; b=bw6HDlpbSFyYhMJ6dLoxZDmYdRTtGoJariA6h8U1l/fpqPW0AOOptvli85wycwMBlF zs6I2S9Y/CBGCIIByqvXRLlFguj+h5vPE8VY05lKGHVWTsfSX3eeWthdh02zkZp8fViW fhd1hfbfdjtATS2aPO3oCCaIPS/hXgfGJLxG83teQnXzY1OW7+hxp4B6Qzc1YkN88YdJ 7R4JNJaWdl3W6cSjzIXqCBdGQPFST9pXSbqYgV9m2j7QidpSpbrDDPnfD7zJt8zGPQaK O9DVu2z7VsqdDa1PVvrrhJwvm1bPnnz4panv0y5BcOgA1PvYA4WPb1DAWC8j/BZulhP8 xQYQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id j65si158686wmj.2.2019.12.10.10.34.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2019 10:34:26 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id xBAIYQRL015955 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 10 Dec 2019 19:34:26 +0100 Received: from md1f2u6c.ad001.siemens.net ([139.25.68.37]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id xBAIYPkN002418 for ; Tue, 10 Dec 2019 19:34:26 +0100 From: Jan Kiszka To: isar-users Subject: [PATCH 2/6] oe/path.py: copyhardlinktree: don't overwrite existing symlinks Date: Tue, 10 Dec 2019 19:34:21 +0100 Message-Id: <3caf5b70bab647303e44ec149f8b999bce659ec0.1576002865.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: v8YpmgHONrPv From: Ioan-Adrian Ratiu Before GNU tar 1.24, only the archive creation command had the '-h' argument to preserve and follow symlinks. After >= 1.24 via commit 14efeb9f956e38d7be (tar: --dereference consistency) the capability to preserve symlinks was also added to the archive extraction command. -h is default at archive creation but is not default at extraction, meaning that it will replace symlinks with directories even if the original filesystem directory tree and archive contains them. Add -h to the copyhardlinktree extraction step so the build can support symlinks in variables like ${DEPLOY_DIR_IPK/RPM/DEB}. Signed-off-by: Ioan-Adrian Ratiu Signed-off-by: Richard Purdie [Jan: imported from OE-core c1b73fe26540c38086e259be6eb313e0826dceed] Signed-off-by: Jan Kiszka --- meta/lib/oe/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index 410738b..515153d 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py @@ -102,7 +102,7 @@ def copyhardlinktree(src, dst): if (os.stat(src).st_dev == os.stat(dst).st_dev): # Need to copy directories only with tar first since cp will error if two # writers try and create a directory at the same time - cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, src, dst) + cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xhf - -C %s" % (src, src, dst) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) source = '' if os.path.isdir(src): -- 2.16.4