summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-11-19 08:05:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:32:00 +0000
commit1a210e6374b2e8140373fcb715b19d1d8c6b4b3e (patch)
tree5c2ce525da01f2a86acaf3350706d4742ca479ab /meta/classes/license.bbclass
parent74c7cd53ea74fad06f0adca32c05c1c8804f2e25 (diff)
downloadpoky-1a210e6374b2e8140373fcb715b19d1d8c6b4b3e.tar.gz
license.bbclass: Write recipeinfo file in license folder
Currently there is no way to get the recipe version when creating the rootfs. It is needed because the manifest file for the image has to contain this important piece of information. This change writes a new file in the license folder for every recipe. This file is called "recipeinfo" and have the information used to write the manifest file for the recipes deployed next to the image. [YOCTO #6772] (From OE-Core rev: 2d97d82fb51281fe130e8d135f3cf9a78423dd94) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 8ad4614d61..17ae82d2c5 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -142,6 +142,10 @@ python do_populate_lic() {
142 # The base directory we wrangle licenses to 142 # The base directory we wrangle licenses to
143 destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True)) 143 destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
144 copy_license_files(lic_files_paths, destdir) 144 copy_license_files(lic_files_paths, destdir)
145 info = get_recipe_info(d)
146 with open(os.path.join(destdir, "recipeinfo"), "w") as f:
147 for key in sorted(info.keys()):
148 f.write("%s: %s\n" % (key, info[key]))
145} 149}
146 150
147# it would be better to copy them in do_install_append, but find_license_filesa is python 151# it would be better to copy them in do_install_append, but find_license_filesa is python
@@ -156,6 +160,13 @@ python perform_packagecopy_prepend () {
156 add_package_and_files(d) 160 add_package_and_files(d)
157} 161}
158 162
163def get_recipe_info(d):
164 info = {}
165 info["PV"] = d.getVar("PV", True)
166 info["PR"] = d.getVar("PR", True)
167 info["LICENSE"] = d.getVar("LICENSE", True)
168 return info
169
159def add_package_and_files(d): 170def add_package_and_files(d):
160 packages = d.getVar('PACKAGES', True) 171 packages = d.getVar('PACKAGES', True)
161 files = d.getVar('LICENSE_FILES_DIRECTORY', True) 172 files = d.getVar('LICENSE_FILES_DIRECTORY', True)