summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-10 16:49:38 -0500
committerSteve Sakoman <steve@sakoman.com>2024-10-18 06:04:40 -0700
commit75ac1f529a22e56988bda53b58d2cc34fb7baea4 (patch)
tree162b9312d3d94a9747cc3d5c97fe175439153849 /meta/classes-global
parent302fd9c095e408458439fabbbdaeed899d99b17e (diff)
downloadpoky-75ac1f529a22e56988bda53b58d2cc34fb7baea4.tar.gz
license: Fix directory layout issues
There are several issues: a) pointless empty directories were being created as a path wasn't fixed in a previous commit b) SSTATE_PKGARCH wasn't being captured into the task signature since it is in the ignore list by default. We want to capture the absolute value, not the dependencies c) with those issues fixed, cross/native issues became apparent so those need to be fixed too. (From OE-Core rev: a31b46627a85ea871deb760f3d0008de72ceb439) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backport from oe-core master: f68aed302a0e4b86fb8c16a6ef4e7295bed48b86 Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes-global')
-rw-r--r--meta/classes-global/license.bbclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass
index b2e0d3faba..d7c5d08a77 100644
--- a/meta/classes-global/license.bbclass
+++ b/meta/classes-global/license.bbclass
@@ -18,8 +18,14 @@ LICENSE_CREATE_PACKAGE ??= "0"
18LICENSE_PACKAGE_SUFFIX ??= "-lic" 18LICENSE_PACKAGE_SUFFIX ??= "-lic"
19LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" 19LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/"
20 20
21LICENSE_DEPLOY_PATHCOMPONENT = "${SSTATE_PKGARCH}"
22LICENSE_DEPLOY_PATHCOMPONENT:class-cross = "native"
23LICENSE_DEPLOY_PATHCOMPONENT:class-native = "native"
24# Ensure the *value* of SSTATE_PKGARCH is captured as it is used in the output paths
25LICENSE_DEPLOY_PATHCOMPONENT[vardepvalue] += "${LICENSE_DEPLOY_PATHCOMPONENT}"
26
21addtask populate_lic after do_patch before do_build 27addtask populate_lic after do_patch before do_build
22do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" 28do_populate_lic[dirs] = "${LICSSTATEDIR}/${LICENSE_DEPLOY_PATHCOMPONENT}/${PN}"
23do_populate_lic[cleandirs] = "${LICSSTATEDIR}" 29do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
24 30
25python do_populate_lic() { 31python do_populate_lic() {
@@ -29,7 +35,7 @@ python do_populate_lic() {
29 lic_files_paths = find_license_files(d) 35 lic_files_paths = find_license_files(d)
30 36
31 # The base directory we wrangle licenses to 37 # The base directory we wrangle licenses to
32 destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('SSTATE_PKGARCH'), d.getVar('PN')) 38 destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('LICENSE_DEPLOY_PATHCOMPONENT'), d.getVar('PN'))
33 copy_license_files(lic_files_paths, destdir) 39 copy_license_files(lic_files_paths, destdir)
34 info = get_recipe_info(d) 40 info = get_recipe_info(d)
35 with open(os.path.join(destdir, "recipeinfo"), "w") as f: 41 with open(os.path.join(destdir, "recipeinfo"), "w") as f: