diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-19 11:46:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-20 23:51:11 +0100 |
commit | 7ebbd68f0fb237f511cd2629ef9f6fc4d8488736 (patch) | |
tree | b7ee47c58e13569c5466e49c22cbdb1fbd88ff45 /meta/classes-global | |
parent | 84e17003c6098007f896ef301449a4748f9720fe (diff) | |
download | poky-7ebbd68f0fb237f511cd2629ef9f6fc4d8488736.tar.gz |
license/license_image: Fix license file layout to avoid overlapping files
Currently DEPLOY_DIR/licenses is added to SSTATE_ALLOW_OVERLAP_FILES. This
leads to bugs since when one MACHINE_ARCH recipes is cleaned, it removes the
files for another which then results in later build failures as license files
disappear.
The solution is to include SSTAGE_PKGARCH in the path names to the license files.
That does mean a search has to be used to find the correct license files for a
given PN but that can be done via SSTATE_ARCHS.
The implication for other tools is the layout has changed so tools will need to
adapt to the new paths. The benefit is no more strange build failures such as from
patterns like:
MACHINE=qemux86-64 bitbake core-image-minimal
MACHINE=genericx86-64 bitbake core-image-minimal
MACHINE=qemux86-64 bitbake linux-yocto -c clean
MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs
[YOCTO #14123]
For anyone finding this commit, I'd question how much people should be relying on
this code for tooling and suggest the SPDX manifests should be the preferred data
format going forward anyway.
(From OE-Core rev: 1a4ab9fc26659507e678e87312b514e8ea515673)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/license.bbclass | 2 | ||||
-rw-r--r-- | meta/classes-global/sstate.bbclass | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass index 23625f0104..b2e0d3faba 100644 --- a/meta/classes-global/license.bbclass +++ b/meta/classes-global/license.bbclass | |||
@@ -29,7 +29,7 @@ python do_populate_lic() { | |||
29 | lic_files_paths = find_license_files(d) | 29 | lic_files_paths = find_license_files(d) |
30 | 30 | ||
31 | # The base directory we wrangle licenses to | 31 | # The base directory we wrangle licenses to |
32 | destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('PN')) | 32 | destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('SSTATE_PKGARCH'), d.getVar('PN')) |
33 | copy_license_files(lic_files_paths, destdir) | 33 | copy_license_files(lic_files_paths, destdir) |
34 | info = get_recipe_info(d) | 34 | info = get_recipe_info(d) |
35 | with open(os.path.join(destdir, "recipeinfo"), "w") as f: | 35 | with open(os.path.join(destdir, "recipeinfo"), "w") as f: |
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index d846e22f44..13ac844272 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass | |||
@@ -55,8 +55,6 @@ PV[vardepvalue] = "${PV}" | |||
55 | SSTATE_EXTRAPATH[vardepvalue] = "" | 55 | SSTATE_EXTRAPATH[vardepvalue] = "" |
56 | SSTATE_EXTRAPATHWILDCARD[vardepvalue] = "" | 56 | SSTATE_EXTRAPATHWILDCARD[vardepvalue] = "" |
57 | 57 | ||
58 | # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical) | ||
59 | SSTATE_ALLOW_OVERLAP_FILES = "${DEPLOY_DIR}/licenses/" | ||
60 | # Avoid docbook/sgml catalog warnings for now | 58 | # Avoid docbook/sgml catalog warnings for now |
61 | SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml" | 59 | SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml" |
62 | # sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE | 60 | # sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE |