diff options
| author | Diego Sueiro <diego.sueiro@arm.com> | 2020-09-11 12:30:27 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-12 14:49:00 +0100 |
| commit | f688eb3f3dbe7bb7fb3fb8180c1dbd0782d66d45 (patch) | |
| tree | 1a3aed526c9a1d46658f62ad9f8b5e6c0a616432 /meta/classes | |
| parent | 6559577d70d291b9a3c4d145b34d0e86a854066a (diff) | |
| download | poky-f688eb3f3dbe7bb7fb3fb8180c1dbd0782d66d45.tar.gz | |
license_image.bbclass: Fix symlink to the image license manifest dir creation
If IMAGE_LINK_NAME is empty don't try to create the symlink.
[YOCTO #14042]
(From OE-Core rev: b54d92235408abdf0ba75a4d46329ec992af6006)
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/license_image.bbclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index 682d46237f..702e9f9c55 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass | |||
| @@ -200,14 +200,16 @@ def license_deployed_manifest(d): | |||
| 200 | image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest') | 200 | image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest') |
| 201 | write_license_files(d, image_license_manifest, man_dic, rootfs=False) | 201 | write_license_files(d, image_license_manifest, man_dic, rootfs=False) |
| 202 | 202 | ||
| 203 | lic_manifest_symlink_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'), | 203 | link_name = d.getVar('IMAGE_LINK_NAME') |
| 204 | d.getVar('IMAGE_LINK_NAME')) | 204 | if link_name: |
| 205 | # remove old symlink | 205 | lic_manifest_symlink_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'), |
| 206 | if os.path.islink(lic_manifest_symlink_dir): | 206 | link_name) |
| 207 | os.unlink(lic_manifest_symlink_dir) | 207 | # remove old symlink |
| 208 | 208 | if os.path.islink(lic_manifest_symlink_dir): | |
| 209 | # create the image dir symlink | 209 | os.unlink(lic_manifest_symlink_dir) |
| 210 | os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) | 210 | |
| 211 | # create the image dir symlink | ||
| 212 | os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) | ||
| 211 | 213 | ||
| 212 | def get_deployed_dependencies(d): | 214 | def get_deployed_dependencies(d): |
| 213 | """ | 215 | """ |
