summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReto Schneider <reto.schneider@husqvarnagroup.com>2021-04-26 23:27:57 +0200
committerAnuj Mittal <anuj.mittal@intel.com>2021-05-06 10:09:37 +0800
commite24510fbb1439d56a278e2b5fc036d11a24e23df (patch)
tree2e7d8e1e68e73cda12625c2ea29f67d8b420a36a
parentafeefde357e468ba79570208bd67d097b9cb9ee1 (diff)
downloadopenembedded-core-e24510fbb1439d56a278e2b5fc036d11a24e23df.tar.gz
license_image.bbclass: Fix symlink to generic license files
Link to the canonical filename of a license as only this one exists. Fixes commit 670fe71dd18ea675f35581db4a61fda137f8bf00 [license_image.bbclass: use canonical name for license files]. Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64b1ba978e079c345e1f7fbd1bf44052fc3dd857) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/classes/license_image.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index b9a0f2359b..73cebb4d55 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -144,12 +144,13 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
continue
# Make sure we use only canonical name for the license file
- rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic)
+ generic_lic_file = "generic_%s" % generic_lic
+ rootfs_license = os.path.join(rootfs_license_dir, generic_lic_file)
if not os.path.exists(rootfs_license):
oe.path.copyhardlink(pkg_license, rootfs_license)
if not os.path.exists(pkg_rootfs_license):
- os.symlink(os.path.join('..', lic), pkg_rootfs_license)
+ os.symlink(os.path.join('..', generic_lic_file), pkg_rootfs_license)
else:
if (oe.license.license_ok(canonical_license(d,
lic), bad_licenses) == False or