[OE-core] [PATCH 4/7] package: Fix file copying to preserve sparse files

Richard Purdie richard.purdie at linuxfoundation.org
Mon Aug 13 14:28:32 UTC 2018


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 at linuxfoundation.org>
---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8459d39b27e..a1169489522 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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
-- 
2.17.1




More information about the Openembedded-core mailing list