summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)