[oe-commits] Richard Purdie : lib/oe/path: Fixup handling of .* files in top level paths for copyhardlinktree()

git at git.openembedded.org git at git.openembedded.org
Sat Nov 9 08:51:36 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 356230e87b676e1cf0976634ecf99541ad94cb0e
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=356230e87b676e1cf0976634ecf99541ad94cb0e

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Nov  8 22:13:38 2013 +0000

lib/oe/path: Fixup handling of .* files in top level paths for copyhardlinktree()

Files named .* in the top level of directories handled by this function
were getting lost after the directory copying command was fixed. Rather
than complicate the function further, use cpio instead.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/path.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index d0588ba..46783f8 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -95,9 +95,7 @@ def copyhardlinktree(src, dst):
         # writers try and create a directory at the same time
         cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - --no-recursion | tar -xf - -C %s' % (src, src, dst)
         check_output(cmd, shell=True, stderr=subprocess.STDOUT)
-        if os.path.isdir(src):
-            src = src + "/*"
-        cmd = 'cp -afl %s %s' % (src, dst)
+        cmd = 'cd %s; find . -print0 | cpio --null -pdlu %s' % (src, dst)
         check_output(cmd, shell=True, stderr=subprocess.STDOUT)
     else:
         copytree(src, dst)



More information about the Openembedded-commits mailing list