All of lore.kernel.org
 help / color / mirror / Atom feed
* [poky][dunfell][PATCH] buildhistory.bbclass: store MAINTAINER variable
@ 2021-03-26 13:46 Purushottam choudhary
  2021-03-26 14:03 ` [OE-core] " Martin Jansa
  0 siblings, 1 reply; 2+ messages in thread
From: Purushottam choudhary @ 2021-03-26 13:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: nisha.parrakat, harpritkaur.bhandari

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.choudhary@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 8a1359a..04fac82 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -109,6 +109,7 @@ python buildhistory_emit_pkghistory() {
             self.pe = "0"
             self.pv = "0"
             self.pr = "r0"
+            self.maintainer = ""
             self.depends = ""
             self.packages = ""
             self.srcrev = ""
@@ -126,6 +127,7 @@ python buildhistory_emit_pkghistory() {
             self.pkge = ""
             self.pkgv = ""
             self.pkgr = ""
+            self.maintainer = ""
             self.size = 0
             self.depends = ""
             self.rprovides = ""
@@ -162,6 +164,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":
@@ -215,6 +219,7 @@ python buildhistory_emit_pkghistory() {
     pr = d.getVar('PR')
     layer = bb.utils.get_file_layer(d.getVar('FILE'), d)

+    maintainer = d.getVar('MAINTAINER') or ''
     pkgdata_dir = d.getVar('PKGDATA_DIR')
     packages = ""
     try:
@@ -251,6 +256,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
@@ -270,6 +276,7 @@ python buildhistory_emit_pkghistory() {
         pkge = pkgdata.get('PKGE', '0')
         pkgv = pkgdata['PKGV']
         pkgr = pkgdata['PKGR']
+        pkg_maintainer = d.getVar('MAINTAINER_%s' % (pkg,), True) or maintainer
         #
         # Find out what the last version was
         # Make sure the version did not decrease
@@ -293,6 +300,7 @@ python buildhistory_emit_pkghistory() {
         pkginfo.pkge = pkge
         pkginfo.pkgv = pkgv
         pkginfo.pkgr = pkgr
+        pkginfo.maintainer = pkg_maintainer
         pkginfo.rprovides = sortpkglist(oe.utils.squashspaces(pkgdata.get('RPROVIDES', "")))
         pkginfo.rdepends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RDEPENDS', "")))
         pkginfo.rrecommends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RRECOMMENDS', "")))
@@ -368,6 +376,7 @@ def write_recipehistory(rcpinfo, d):
         f.write(u"DEPENDS = %s\n" %  rcpinfo.depends)
         f.write(u"PACKAGES = %s\n" %  rcpinfo.packages)
         f.write(u"LAYER = %s\n" %  rcpinfo.layer)
+        f.write(u"MAINTAINER = %s\n" % rcpinfo.maintainer)

     write_latest_srcrev(d, pkghistdir)

@@ -386,6 +395,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.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [poky][dunfell][PATCH] buildhistory.bbclass: store MAINTAINER variable
  2021-03-26 13:46 [poky][dunfell][PATCH] buildhistory.bbclass: store MAINTAINER variable Purushottam choudhary
@ 2021-03-26 14:03 ` Martin Jansa
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Jansa @ 2021-03-26 14:03 UTC (permalink / raw)
  To: Purushottam choudhary
  Cc: Patches and discussions about the oe-core layer, Nisha Parrakat,
	Harpritkaur Bhandari

[-- Attachment #1: Type: text/plain, Size: 4555 bytes --]

This change isn't in master nor gatesgarth.

On Fri, Mar 26, 2021 at 2:46 PM Purushottam choudhary <
purushottam.choudhary@kpit.com> wrote:

> 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.choudhary@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 8a1359a..04fac82 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -109,6 +109,7 @@ python buildhistory_emit_pkghistory() {
>              self.pe = "0"
>              self.pv = "0"
>              self.pr = "r0"
> +            self.maintainer = ""
>              self.depends = ""
>              self.packages = ""
>              self.srcrev = ""
> @@ -126,6 +127,7 @@ python buildhistory_emit_pkghistory() {
>              self.pkge = ""
>              self.pkgv = ""
>              self.pkgr = ""
> +            self.maintainer = ""
>              self.size = 0
>              self.depends = ""
>              self.rprovides = ""
> @@ -162,6 +164,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":
> @@ -215,6 +219,7 @@ python buildhistory_emit_pkghistory() {
>      pr = d.getVar('PR')
>      layer = bb.utils.get_file_layer(d.getVar('FILE'), d)
>
> +    maintainer = d.getVar('MAINTAINER') or ''
>      pkgdata_dir = d.getVar('PKGDATA_DIR')
>      packages = ""
>      try:
> @@ -251,6 +256,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
> @@ -270,6 +276,7 @@ python buildhistory_emit_pkghistory() {
>          pkge = pkgdata.get('PKGE', '0')
>          pkgv = pkgdata['PKGV']
>          pkgr = pkgdata['PKGR']
> +        pkg_maintainer = d.getVar('MAINTAINER_%s' % (pkg,), True) or
> maintainer
>          #
>          # Find out what the last version was
>          # Make sure the version did not decrease
> @@ -293,6 +300,7 @@ python buildhistory_emit_pkghistory() {
>          pkginfo.pkge = pkge
>          pkginfo.pkgv = pkgv
>          pkginfo.pkgr = pkgr
> +        pkginfo.maintainer = pkg_maintainer
>          pkginfo.rprovides =
> sortpkglist(oe.utils.squashspaces(pkgdata.get('RPROVIDES', "")))
>          pkginfo.rdepends =
> sortpkglist(oe.utils.squashspaces(pkgdata.get('RDEPENDS', "")))
>          pkginfo.rrecommends =
> sortpkglist(oe.utils.squashspaces(pkgdata.get('RRECOMMENDS', "")))
> @@ -368,6 +376,7 @@ def write_recipehistory(rcpinfo, d):
>          f.write(u"DEPENDS = %s\n" %  rcpinfo.depends)
>          f.write(u"PACKAGES = %s\n" %  rcpinfo.packages)
>          f.write(u"LAYER = %s\n" %  rcpinfo.layer)
> +        f.write(u"MAINTAINER = %s\n" % rcpinfo.maintainer)
>
>      write_latest_srcrev(d, pkghistdir)
>
> @@ -386,6 +395,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.
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 6287 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-26 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 13:46 [poky][dunfell][PATCH] buildhistory.bbclass: store MAINTAINER variable Purushottam choudhary
2021-03-26 14:03 ` [OE-core] " Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.