]> code.ossystems Code Review - openembedded-core.git/commitdiff
package: Fix file copying to preserve sparse files
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 Aug 2018 22:29:49 +0000 (22:29 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Aug 2018 10:36:22 +0000 (11:36 +0100)
We want to preserve sparse files when building the system, add the option
to tar to ensure we do this when copying files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 8459d39b27eb9577c185373f1830ee24763cd826..a1169489522bb193a19937904c9b021d83408260 100644 (file)
@@ -649,7 +649,7 @@ python perform_packagecopy () {
     # Start by package population by taking a copy of the installed
     # files to operate on
     # Preserve sparse files and hard links
-    cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar)
+    cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
     subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
     # replace RPATHs for the nativesdk binaries, to make them relocatable