]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging: Introduce /sysroot-only to SYSROOT_DIRS
authorDiego Sueiro <diego.sueiro@arm.com>
Fri, 15 Jan 2021 15:59:51 +0000 (15:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 16 Jan 2021 22:39:17 +0000 (22:39 +0000)
The '/sysroot-only' in SYSROOT_DIRS is to be used by recipes which
generate artifacts that are not included in the target filesystem.

Also, remove the ${D}/sysroot-only dir before copying D do PKGD to
generate the packages since it is not supposed to be included in
any package.

This will allow recipes to share non-target filesystem artifacts
without needing to use the DEPLOY_DIR and keep it tidy.

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass
meta/classes/staging.bbclass

index 247bdc7bbfe3beb31026977fc470d0d815b11659..a77d532b66b9a37089afb5df7008c427cdd689fb 100644 (file)
@@ -807,10 +807,16 @@ python package_do_split_locales() {
 
 python perform_packagecopy () {
     import subprocess
+    import shutil
 
     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
index f0a619b35bdc65687478863bb56703456ad16a0c..12e0eab4f0f44c29f029019c266d9d87a09ccdd1 100644 (file)
@@ -5,6 +5,7 @@ SYSROOT_DIRS = " \
     ${base_libdir} \
     ${nonarch_base_libdir} \
     ${datadir} \
+    /sysroot-only \
 "
 
 # These directories are also staged in the sysroot when they contain files that