* [PATCH v2 1/1] buildhistory.bbclass: Add license declaration to packages and recipes
@ 2017-03-01 13:21 Hugo.Jacob
2017-03-01 22:16 ` Burton, Ross
0 siblings, 1 reply; 2+ messages in thread
From: Hugo.Jacob @ 2017-03-01 13:21 UTC (permalink / raw)
To: openembedded-core
Having the license declaration in the buildhistory is useful to track
licenses changes, licenses going to a given image and etc. This change
adds the license declaration for recipes and packages to its
buildhistory data.
Signed-off-by: Hugo Jacob <Hugo.Jacob@bmw.de>
---
meta/classes/buildhistory.bbclass | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3a5bc2c3e3..f6525dfd72 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -83,6 +83,7 @@ python buildhistory_emit_pkghistory() {
self.pe = "0"
self.pv = "0"
self.pr = "r0"
+ self.license = ""
self.depends = ""
self.packages = ""
self.srcrev = ""
@@ -94,6 +95,7 @@ python buildhistory_emit_pkghistory() {
self.pe = "0"
self.pv = "0"
self.pr = "r0"
+ self.license = ""
# pkg/pkge/pkgv/pkgr should be empty because we want to be able to default them
self.pkg = ""
self.pkge = ""
@@ -186,6 +188,7 @@ python buildhistory_emit_pkghistory() {
pe = d.getVar('PE', True) or "0"
pv = d.getVar('PV', True)
pr = d.getVar('PR', True)
+ license = d.getVar('LICENSE', True)
pkgdata_dir = d.getVar('PKGDATA_DIR', True)
packages = ""
@@ -223,6 +226,7 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
+ rcpinfo.license = license
rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS', True) or ""))
rcpinfo.packages = packages
write_recipehistory(rcpinfo, d)
@@ -241,6 +245,7 @@ python buildhistory_emit_pkghistory() {
pkge = pkgdata.get('PKGE', '0')
pkgv = pkgdata['PKGV']
pkgr = pkgdata['PKGR']
+ pkg_license = d.getVar('LICENSE_%s' % pkg, True) or license
#
# Find out what the last version was
# Make sure the version did not decrease
@@ -261,6 +266,7 @@ python buildhistory_emit_pkghistory() {
pkginfo.pv = pkgdata['PV']
pkginfo.pr = pkgdata['PR']
pkginfo.pkg = pkgdata['PKG']
+ pkginfo.license = pkg_license
pkginfo.pkge = pkge
pkginfo.pkgv = pkgv
pkginfo.pkgr = pkgr
@@ -301,6 +307,7 @@ def write_recipehistory(rcpinfo, d):
f.write(u"PE = %s\n" % rcpinfo.pe)
f.write(u"PV = %s\n" % rcpinfo.pv)
f.write(u"PR = %s\n" % rcpinfo.pr)
+ f.write(u"LICENSE = %s\n" % rcpinfo.license)
f.write(u"DEPENDS = %s\n" % rcpinfo.depends)
f.write(u"PACKAGES = %s\n" % rcpinfo.packages)
@@ -320,6 +327,7 @@ def write_pkghistory(pkginfo, d):
f.write(u"PE = %s\n" % pkginfo.pe)
f.write(u"PV = %s\n" % pkginfo.pv)
f.write(u"PR = %s\n" % pkginfo.pr)
+ f.write(u"LICENSE = %s\n" % pkginfo.license)
if pkginfo.pkg != pkginfo.name:
f.write(u"PKG = %s\n" % pkginfo.pkg)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] buildhistory.bbclass: Add license declaration to packages and recipes
2017-03-01 13:21 [PATCH v2 1/1] buildhistory.bbclass: Add license declaration to packages and recipes Hugo.Jacob
@ 2017-03-01 22:16 ` Burton, Ross
0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2017-03-01 22:16 UTC (permalink / raw)
To: Hugo.Jacob; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
On 1 March 2017 at 13:21, <Hugo.Jacob@bmw.de> wrote:
> pr = d.getVar('PR', True)
> + license = d.getVar('LICENSE', True)
>
Can you rebase this to master please? We dropped the use of True/False in
general some time ago and this patch doesn't apply cleanly anymore.
Ross
[-- Attachment #2: Type: text/html, Size: 724 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-01 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 13:21 [PATCH v2 1/1] buildhistory.bbclass: Add license declaration to packages and recipes Hugo.Jacob
2017-03-01 22:16 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox