summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRuss Dill <russ.dill@nikolamotor.com>2022-04-20 09:03:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-21 20:58:15 +0100
commitf2016af0399250d2378818758c704c37a96e2ed6 (patch)
treee861d3352d1ed2019a48d97874dd8059a699c1b2 /meta/classes/package.bbclass
parent9e113e175b4942cc302f69078915b15862964c46 (diff)
downloadpoky-f2016af0399250d2378818758c704c37a96e2ed6.tar.gz
package.bbclass: Prevent perform_packagecopy from removing /sysroot-only
The files in /sysroot-only are intended to make it into the recipes sysroot output, but not into the package. However, if do_package is run before do_populate_sysroot, the files are removed. Use a smaller hammer to avoid copying the files into the package so they are still around when do_populate_sysroot runs. (From OE-Core rev: 493145c6f1bc92ab2b7a23e181641b09df87c9ff) Signed-off-by: Russ Dill <russ.dill@nikolamotor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass8
1 files changed, 1 insertions, 7 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e71daafe94..44fbc32df6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -422,7 +422,6 @@ def splitstaticdebuginfo(file, dvar, dv, d):
422 # return a mapping of files:debugsources 422 # return a mapping of files:debugsources
423 423
424 import stat 424 import stat
425 import shutil
426 425
427 src = file[len(dvar):] 426 src = file[len(dvar):]
428 dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"] 427 dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"]
@@ -807,15 +806,10 @@ python perform_packagecopy () {
807 dest = d.getVar('D') 806 dest = d.getVar('D')
808 dvar = d.getVar('PKGD') 807 dvar = d.getVar('PKGD')
809 808
810 # Remove ${D}/sysroot-only if present
811 sysroot_only = os.path.join(dest, 'sysroot-only')
812 if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only):
813 shutil.rmtree(sysroot_only)
814
815 # Start by package population by taking a copy of the installed 809 # Start by package population by taking a copy of the installed
816 # files to operate on 810 # files to operate on
817 # Preserve sparse files and hard links 811 # Preserve sparse files and hard links
818 cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar) 812 cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
819 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) 813 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
820 814
821 # replace RPATHs for the nativesdk binaries, to make them relocatable 815 # replace RPATHs for the nativesdk binaries, to make them relocatable