summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2017-08-21 20:09:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-23 12:06:51 +0100
commite36fbb338232005c0b6db43239cb539c746215bf (patch)
tree90994f60f2a97d239767dbd607f9b6ef8e13bf7e /meta/lib
parent06ff0a9c8a26e394d65cf00ec6b9f1d1958c7fcf (diff)
downloadpoky-e36fbb338232005c0b6db43239cb539c746215bf.tar.gz
oe/path.py: copyhardlinktree: don't overwrite existing symlinks
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}. (From OE-Core rev: c1b73fe26540c38086e259be6eb313e0826dceed) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/path.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 448a2b944e..1ea03d5d56 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -98,7 +98,7 @@ def copyhardlinktree(src, dst):
98 if (os.stat(src).st_dev == os.stat(dst).st_dev): 98 if (os.stat(src).st_dev == os.stat(dst).st_dev):
99 # Need to copy directories only with tar first since cp will error if two 99 # Need to copy directories only with tar first since cp will error if two
100 # writers try and create a directory at the same time 100 # writers try and create a directory at the same time
101 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) 101 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)
102 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) 102 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
103 source = '' 103 source = ''
104 if os.path.isdir(src): 104 if os.path.isdir(src):