From: Richard Purdie Date: Sun, 12 Aug 2018 22:29:49 +0000 (+0000) Subject: package: Fix file copying to preserve sparse files X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~17062 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d86da5ae386a8129a966a53901de160823f4d250;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git package: Fix file copying to preserve sparse files 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 --- 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