summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorReto Schneider <reto.schneider@husqvarnagroup.com>2021-04-26 23:27:57 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-04 22:57:55 +0100
commit945b4ef084cb254643b425748d5e38c4f5908a9a (patch)
tree3fca3937623b28b9141cf13683907851983b74d0 /meta/classes
parent333fbe63550d20b6a0ebb4835787a68e33bfaad9 (diff)
downloadpoky-945b4ef084cb254643b425748d5e38c4f5908a9a.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]. (From OE-Core rev: 834a8e357bc999a0163e7c5bafbcc1a8816448d4) 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: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 cfb0606da9..1396a95f47 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -145,12 +145,13 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
145 continue 145 continue
146 146
147 # Make sure we use only canonical name for the license file 147 # Make sure we use only canonical name for the license file
148 rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic) 148 generic_lic_file = "generic_%s" % generic_lic
149 rootfs_license = os.path.join(rootfs_license_dir, generic_lic_file)
149 if not os.path.exists(rootfs_license): 150 if not os.path.exists(rootfs_license):
150 oe.path.copyhardlink(pkg_license, rootfs_license) 151 oe.path.copyhardlink(pkg_license, rootfs_license)
151 152
152 if not os.path.exists(pkg_rootfs_license): 153 if not os.path.exists(pkg_rootfs_license):
153 os.symlink(os.path.join('..', lic), pkg_rootfs_license) 154 os.symlink(os.path.join('..', generic_lic_file), pkg_rootfs_license)
154 else: 155 else:
155 if (oe.license.license_ok(canonical_license(d, 156 if (oe.license.license_ok(canonical_license(d,
156 lic), bad_licenses) == False or 157 lic), bad_licenses) == False or