diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-05 16:56:03 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-05 21:48:47 +0100 |
commit | 6cc2a3649a03da8b2ebc4fff4b7bd9ba4eb76497 (patch) | |
tree | 0613fca97722a9518281adb8cb7b8d6351fc1753 /meta/classes-global | |
parent | 63055fc4d0e790228af80366632a63a3cd20488a (diff) | |
download | poky-6cc2a3649a03da8b2ebc4fff4b7bd9ba4eb76497.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: f68aed302a0e4b86fb8c16a6ef4e7295bed48b86)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/license.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass index 4e39ec1d44..043715fcc3 100644 --- a/meta/classes-global/license.bbclass +++ b/meta/classes-global/license.bbclass | |||
@@ -18,8 +18,14 @@ LICENSE_CREATE_PACKAGE ??= "0" | |||
18 | LICENSE_PACKAGE_SUFFIX ??= "-lic" | 18 | LICENSE_PACKAGE_SUFFIX ??= "-lic" |
19 | LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" | 19 | LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" |
20 | 20 | ||
21 | LICENSE_DEPLOY_PATHCOMPONENT = "${SSTATE_PKGARCH}" | ||
22 | LICENSE_DEPLOY_PATHCOMPONENT:class-cross = "native" | ||
23 | LICENSE_DEPLOY_PATHCOMPONENT:class-native = "native" | ||
24 | # Ensure the *value* of SSTATE_PKGARCH is captured as it is used in the output paths | ||
25 | LICENSE_DEPLOY_PATHCOMPONENT[vardepvalue] += "${LICENSE_DEPLOY_PATHCOMPONENT}" | ||
26 | |||
21 | addtask populate_lic after do_patch before do_build | 27 | addtask populate_lic after do_patch before do_build |
22 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" | 28 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${LICENSE_DEPLOY_PATHCOMPONENT}/${PN}" |
23 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" | 29 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" |
24 | 30 | ||
25 | python do_populate_lic() { | 31 | python 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: |