summaryrefslogtreecommitdiffstats
path: root/meta/classes/license_image.bbclass
diff options
context:
space:
mode:
authorDiego Sueiro <diego.sueiro@arm.com>2020-09-01 08:12:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-02 16:00:46 +0100
commita6b2d978cb521b603fbfa180fe31552642dddafe (patch)
treec081839a5b1a1bfa0acfff073b49967e6c7f1a40 /meta/classes/license_image.bbclass
parent5128b72d30ee4e448d38c9cec0d795043ff3bfa0 (diff)
downloadpoky-a6b2d978cb521b603fbfa180fe31552642dddafe.tar.gz
license_image.bbclass: Create symlink to the image license manifest dir
In the LICENSE_DIRECTORY each time an image recipe is built a new directory is created to hold the image license manifests. By creating a symlink to the most recent created image license manifest directory, we make things easier for users to collect and pack the data. (From OE-Core rev: 9c6a114213a80bebc2988ae8d39b296bce7f6982) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license_image.bbclass')
-rw-r--r--meta/classes/license_image.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index a8c72da3cb..682d46237f 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -200,6 +200,15 @@ 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'),
204 d.getVar('IMAGE_LINK_NAME'))
205 # remove old symlink
206 if os.path.islink(lic_manifest_symlink_dir):
207 os.unlink(lic_manifest_symlink_dir)
208
209 # create the image dir symlink
210 os.symlink(lic_manifest_dir, lic_manifest_symlink_dir)
211
203def get_deployed_dependencies(d): 212def get_deployed_dependencies(d):
204 """ 213 """
205 Get all the deployed dependencies of an image 214 Get all the deployed dependencies of an image