]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/path: Fix copytree functions for tar 1.27
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Oct 2013 22:02:27 +0000 (23:02 +0100)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 3 Dec 2013 16:49:23 +0000 (16:49 +0000)
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core master rev: 69c26e795c117aabfaf313abbfd10e70ede633d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/path.py

index 76a6ed8314f9a38ec59c49f8080b6642cefcb77f..be66c148ffa6731117066a6aefedfe625ece91f4 100644 (file)
@@ -81,7 +81,7 @@ def copytree(src, dst):
     # This way we also preserve hardlinks between files in the tree.
 
     bb.utils.mkdirhier(dst)
-    cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (src, dst)
+    cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (src, dst)
     check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 def copyhardlinktree(src, dst):
@@ -93,7 +93,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 -cf - -C %s -ps --files-from - | tar -xf - -C %s' % (src, src, dst)
+        cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - | tar -xf - -C %s' % (src, src, dst)
         check_output(cmd, shell=True, stderr=subprocess.STDOUT)
         if os.path.isdir(src):
             src = src + "/*"