]> code.ossystems Code Review - openembedded-core.git/commitdiff
license_image.bbclass: Fix symlink to generic license files
authorReto Schneider <reto.schneider@husqvarnagroup.com>
Mon, 26 Apr 2021 21:27:57 +0000 (23:27 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 3 May 2021 14:56:23 +0000 (04:56 -1000)
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: Steve Sakoman <steve@sakoman.com>
meta/classes/license_image.bbclass

index cfb0606da9b08bca6edce0ca0242ffd156aabfc8..1396a95f4739ce060557534d0aae4b904f6127b3 100644 (file)
@@ -145,12 +145,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