summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/license.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-19 11:46:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-20 23:51:11 +0100
commit7ebbd68f0fb237f511cd2629ef9f6fc4d8488736 (patch)
treeb7ee47c58e13569c5466e49c22cbdb1fbd88ff45 /meta/classes-global/license.bbclass
parent84e17003c6098007f896ef301449a4748f9720fe (diff)
downloadpoky-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/license.bbclass')
-rw-r--r--meta/classes-global/license.bbclass2
1 files changed, 1 insertions, 1 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: