The maintainer declaration in the buildhistory
is useful for tracking the maintainer of recipes.
This change adds the MAINTAINER variable for
recipes and packages to its buildhistory data.

Signed-off-by: Purushottam Choudhary <purushottam.choudh...@kpit.com>
---
 meta/classes/buildhistory.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/classes/buildhistory.bbclass 
b/meta/classes/buildhistory.bbclass
index 49af61c..23357af 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -119,6 +119,7 @@ python buildhistory_emit_pkghistory() {
             self.config = ""
             self.src_uri = ""

+            self.maintainer = ""

     class PackageInfo:
         def __init__(self, name):
@@ -131,6 +132,7 @@ python buildhistory_emit_pkghistory() {
             self.pkge = ""
             self.pkgv = ""
             self.pkgr = ""
+            self.maintainer = ""
             self.size = 0
             self.depends = ""
             self.rprovides = ""
@@ -167,6 +169,8 @@ python buildhistory_emit_pkghistory() {
                     pkginfo.pkgv = value
                 elif name == "PKGR":
                     pkginfo.pkgr = value
+                elif name == "MAINTAINER":
+                    pkginfo.maintainer = value
                 elif name == "RPROVIDES":
                     pkginfo.rprovides = value
                 elif name == "RDEPENDS":
@@ -220,6 +224,7 @@ python buildhistory_emit_pkghistory() {
     pr = d.getVar('PR')
     layer = bb.utils.get_file_layer(d.getVar('FILE'), d)
     license = d.getVar('LICENSE')
+    maintainer = d.getVar('MAINTAINER') or ''

     pkgdata_dir = d.getVar('PKGDATA_DIR')
     packages = ""
@@ -257,6 +262,7 @@ python buildhistory_emit_pkghistory() {
     rcpinfo.pe = pe
     rcpinfo.pv = pv
     rcpinfo.pr = pr
+    rcpinfo.maintainer = maintainer
     rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS') or 
""))
     rcpinfo.packages = packages
     rcpinfo.layer = layer
@@ -274,6 +280,7 @@ python buildhistory_emit_pkghistory() {
         pkge = localdata.getVar("PKGE") or '0'
         pkgv = localdata.getVar("PKGV")
         pkgr = localdata.getVar("PKGR")
+        pkg_maintainer = localdata.getVar('MAINTAINER_%s' % (pkg,), True) or 
maintainer
         #
         # Find out what the last version was
         # Make sure the version did not decrease
@@ -297,6 +304,7 @@ python buildhistory_emit_pkghistory() {
         pkginfo.pkge = pkge
         pkginfo.pkgv = pkgv
         pkginfo.pkgr = pkgr
+        pkginfo.maintainer = pkg_maintainer
         pkginfo.rprovides = 
sortpkglist(oe.utils.squashspaces(localdata.getVar("RPROVIDES") or ""))
         pkginfo.rdepends = 
sortpkglist(oe.utils.squashspaces(localdata.getVar("RDEPENDS") or ""))
         pkginfo.rrecommends = 
sortpkglist(oe.utils.squashspaces(localdata.getVar("RRECOMMENDS") or ""))
@@ -375,6 +383,7 @@ def write_recipehistory(rcpinfo, d):
         f.write(u"LICENSE = %s\n" %  rcpinfo.license)
         f.write(u"CONFIG = %s\n" %  rcpinfo.config)
         f.write(u"SRC_URI = %s\n" %  rcpinfo.src_uri)
+        f.write(u"MAINTAINER = %s\n" % rcpinfo.maintainer)

     write_latest_srcrev(d, pkghistdir)

@@ -393,6 +402,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"MAINTAINER = %s\n" % pkginfo.maintainer)

         if pkginfo.pkg != pkginfo.name:
             f.write(u"PKG = %s\n" % pkginfo.pkg)
--
2.7.4

This message contains information that may be privileged or confidential and is 
the property of the KPIT Technologies Ltd. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient, you are not 
authorized to read, print, retain copy, disseminate, distribute, or use this 
message or any part thereof. If you receive this message in error, please 
notify the sender immediately and delete all copies of this message. KPIT 
Technologies Ltd. does not accept any liability for virus infected mails.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150139): 
https://lists.openembedded.org/g/openembedded-core/message/150139
Mute This Topic: https://lists.openembedded.org/mt/81770608/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to