diff options
| author | Diego Sueiro <diego.sueiro@arm.com> | 2021-01-15 15:59:51 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-16 22:39:35 +0000 |
| commit | b0cbfd01f19ae642fc67bf321c2b3ce6ec14e9c8 (patch) | |
| tree | 99ff2181f86fca7ef8d565fe812facc8ed502163 | |
| parent | 61fb0a5dc013df89499232e6d19b02afb4533509 (diff) | |
| download | poky-b0cbfd01f19ae642fc67bf321c2b3ce6ec14e9c8.tar.gz | |
staging: Introduce /sysroot-only to SYSROOT_DIRS
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.
(From OE-Core rev: ed1c156cf46c2cdd8038d6bcf7ed58ebe275e3a1)
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/package.bbclass | 6 | ||||
| -rw-r--r-- | meta/classes/staging.bbclass | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 247bdc7bbf..a77d532b66 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -807,10 +807,16 @@ python package_do_split_locales() { | |||
| 807 | 807 | ||
| 808 | python perform_packagecopy () { | 808 | python perform_packagecopy () { |
| 809 | import subprocess | 809 | import subprocess |
| 810 | import shutil | ||
| 810 | 811 | ||
| 811 | dest = d.getVar('D') | 812 | dest = d.getVar('D') |
| 812 | dvar = d.getVar('PKGD') | 813 | dvar = d.getVar('PKGD') |
| 813 | 814 | ||
| 815 | # Remove ${D}/sysroot-only if present | ||
| 816 | sysroot_only = os.path.join(dest, 'sysroot-only') | ||
| 817 | if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only): | ||
| 818 | shutil.rmtree(sysroot_only) | ||
| 819 | |||
| 814 | # Start by package population by taking a copy of the installed | 820 | # Start by package population by taking a copy of the installed |
| 815 | # files to operate on | 821 | # files to operate on |
| 816 | # Preserve sparse files and hard links | 822 | # Preserve sparse files and hard links |
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index f0a619b35b..12e0eab4f0 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
| @@ -5,6 +5,7 @@ SYSROOT_DIRS = " \ | |||
| 5 | ${base_libdir} \ | 5 | ${base_libdir} \ |
| 6 | ${nonarch_base_libdir} \ | 6 | ${nonarch_base_libdir} \ |
| 7 | ${datadir} \ | 7 | ${datadir} \ |
| 8 | /sysroot-only \ | ||
| 8 | " | 9 | " |
| 9 | 10 | ||
| 10 | # These directories are also staged in the sysroot when they contain files that | 11 | # These directories are also staged in the sysroot when they contain files that |
