All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: Prevent perform_packagecopy from removing /sysroot-only
@ 2022-04-20 16:03 Russ Dill
  0 siblings, 0 replies; only message in thread
From: Russ Dill @ 2022-04-20 16:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Diego Sueiro, Russ Dill

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.

Signed-off-by: Russ Dill <russ.dill@nikolamotor.com>
---
 meta/classes/package.bbclass | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 985dfacd09..c0e9b4dbca 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -428,7 +428,6 @@ def splitstaticdebuginfo(file, dvar, debugstaticdir, debugstaticlibdir, debugsta
     # return a mapping of files:debugsources
 
     import stat
-    import shutil
 
     src = file[len(dvar):]
     dest = debugstaticlibdir + os.path.dirname(src) + debugstaticdir + "/" + os.path.basename(src) + debugstaticappend
@@ -811,15 +810,10 @@ python perform_packagecopy () {
     dest = d.getVar('D')
     dvar = d.getVar('PKGD')
 
-    # Remove ${D}/sysroot-only if present
-    sysroot_only = os.path.join(dest, 'sysroot-only')
-    if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only):
-        shutil.rmtree(sysroot_only)
-
     # 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 -S . | tar -xf - -C %s' % (dest, dvar)
+    cmd = 'tar --exclude=./sysroot-only -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.25.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-21 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 16:03 [PATCH] package.bbclass: Prevent perform_packagecopy from removing /sysroot-only Russ Dill

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.