All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] classes/buildhistory: capture package config
@ 2020-06-03  8:12 Jan Luebbe
  2020-06-15 11:29 ` Mikko Rapeli
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Luebbe @ 2020-06-03  8:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jan Luebbe

As the PACKAGECONFIG variable has a large influence on the resulting
package sizes and dependencies, it's useful to capture it in the
recipe-level buildhistory. This makes it straightforward to analyze the
impact of PACKAGECONFIG changes on the resulting image size.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 meta/classes/buildhistory.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index eb7295570dbd..a4288ef9e1f5 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -113,6 +113,7 @@ python buildhistory_emit_pkghistory() {
             self.packages = ""
             self.srcrev = ""
             self.layer = ""
+            self.config = ""
 
 
     class PackageInfo:
@@ -254,6 +255,7 @@ python buildhistory_emit_pkghistory() {
     rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS') or ""))
     rcpinfo.packages = packages
     rcpinfo.layer = layer
+    rcpinfo.config = sortlist(oe.utils.squashspaces(d.getVar('PACKAGECONFIG') or ""))
     write_recipehistory(rcpinfo, d)
 
     pkgdest = d.getVar('PKGDEST')
@@ -368,6 +370,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"CONFIG = %s\n" %  rcpinfo.config)
 
     write_latest_srcrev(d, pkghistdir)
 
-- 
2.27.0


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

* Re: [OE-core][PATCH] classes/buildhistory: capture package config
  2020-06-03  8:12 [OE-core][PATCH] classes/buildhistory: capture package config Jan Luebbe
@ 2020-06-15 11:29 ` Mikko Rapeli
  2020-06-15 12:17   ` Jan Luebbe
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko Rapeli @ 2020-06-15 11:29 UTC (permalink / raw)
  To: jlu; +Cc: openembedded-core


On Wed, Jun 03, 2020 at 10:12:37AM +0200, Jan Luebbe wrote:
> As the PACKAGECONFIG variable has a large influence on the resulting
> package sizes and dependencies, it's useful to capture it in the
> recipe-level buildhistory. This makes it straightforward to analyze the
> impact of PACKAGECONFIG changes on the resulting image size.

Thanks, this is a good idea! I would print using full PACKAGECONFIG name
to avoid any confusion.

And this reminds me that DISTRO_FEATURES isn't logged into buildhistory either
afaik...

A generic approach for adding more variables to buildhistory would be nice.

-Mikko

> 
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
>  meta/classes/buildhistory.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index eb7295570dbd..a4288ef9e1f5 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -113,6 +113,7 @@ python buildhistory_emit_pkghistory() {
>              self.packages = ""
>              self.srcrev = ""
>              self.layer = ""
> +            self.config = ""
>
>
>      class PackageInfo:
> @@ -254,6 +255,7 @@ python buildhistory_emit_pkghistory() {
>      rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS') or ""))
>      rcpinfo.packages = packages
>      rcpinfo.layer = layer
> +    rcpinfo.config = sortlist(oe.utils.squashspaces(d.getVar('PACKAGECONFIG') or ""))
>      write_recipehistory(rcpinfo, d)
>
>      pkgdest = d.getVar('PKGDEST')
> @@ -368,6 +370,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"CONFIG = %s\n" %  rcpinfo.config)
>
>      write_latest_srcrev(d, pkghistdir)
>
> -- 
> 2.27.0
> 

> 

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

* Re: [OE-core][PATCH] classes/buildhistory: capture package config
  2020-06-15 11:29 ` Mikko Rapeli
@ 2020-06-15 12:17   ` Jan Luebbe
  2020-06-15 13:55     ` Mikko Rapeli
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Luebbe @ 2020-06-15 12:17 UTC (permalink / raw)
  To: Mikko.Rapeli; +Cc: openembedded-core

Hi,

On Mon, 2020-06-15 at 11:29 +0000, Mikko.Rapeli@bmw.de wrote:
> On Wed, Jun 03, 2020 at 10:12:37AM +0200, Jan Luebbe wrote:
> > As the PACKAGECONFIG variable has a large influence on the
> > resulting
> > package sizes and dependencies, it's useful to capture it in the
> > recipe-level buildhistory. This makes it straightforward to analyze
> > the
> > impact of PACKAGECONFIG changes on the resulting image size.
> 
> Thanks, this is a good idea! I would print using full PACKAGECONFIG
> name to avoid any confusion.

Note that Richard has already merged this in master.

I thought it was pretty clear when looking at if from the package
context in the buildhistory. I wouldn't mind renaming it to
PACKAGECONFIG, it there's agreement that it would be clearer.

> And this reminds me that DISTRO_FEATURES isn't logged into
> buildhistory either afaik...

Might be useful, but DISTRO_FEATURES is relatively high-level so
there's usually not much details you can optimize.

Jan

> A generic approach for adding more variables to buildhistory would be
> nice.




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

* Re: [OE-core][PATCH] classes/buildhistory: capture package config
  2020-06-15 12:17   ` Jan Luebbe
@ 2020-06-15 13:55     ` Mikko Rapeli
  0 siblings, 0 replies; 4+ messages in thread
From: Mikko Rapeli @ 2020-06-15 13:55 UTC (permalink / raw)
  To: jlu; +Cc: openembedded-core

Hi,

On Mon, Jun 15, 2020 at 02:17:51PM +0200, Jan Lübbe wrote:
> On Mon, 2020-06-15 at 11:29 +0000, Mikko.Rapeli@bmw.de wrote:
> > On Wed, Jun 03, 2020 at 10:12:37AM +0200, Jan Luebbe wrote:
> > > As the PACKAGECONFIG variable has a large influence on the
> > > resulting
> > > package sizes and dependencies, it's useful to capture it in the
> > > recipe-level buildhistory. This makes it straightforward to analyze
> > > the
> > > impact of PACKAGECONFIG changes on the resulting image size.
> > 
> > Thanks, this is a good idea! I would print using full PACKAGECONFIG
> > name to avoid any confusion.
> 
> Note that Richard has already merged this in master.
> 
> I thought it was pretty clear when looking at if from the package
> context in the buildhistory. I wouldn't mind renaming it to
> PACKAGECONFIG, it there's agreement that it would be clearer.

Yes, to me it is also clear, but I find it better to be explicit and to avoid
duplication. Now someone needs to write to some manual that CONFIG in buildhistory
recipe metadata means PACKAGECONFIG :) But I'm happy this in mastes as is too.

> > And this reminds me that DISTRO_FEATURES isn't logged into
> > buildhistory either afaik...
> 
> Might be useful, but DISTRO_FEATURES is relatively high-level so
> there's usually not much details you can optimize.

Yes, but in most cases it directly influences PACKAGECONFIG in various recipes.
At least I modify PACKAGECONFIG of many recipes, sometimes through DISTRO_FEATURES
and sometimes directly using bbappends. End results is not always clear and
I have to use 'bitbake -e' and manual inspection of installed files and features
to verify results. Recording things to buildhistory would be nice.

Buildhistory is so usefull that I feel like it should contain all data parsed by
bitbake...

Cheers,

-Mikko

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

end of thread, other threads:[~2020-06-15 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03  8:12 [OE-core][PATCH] classes/buildhistory: capture package config Jan Luebbe
2020-06-15 11:29 ` Mikko Rapeli
2020-06-15 12:17   ` Jan Luebbe
2020-06-15 13:55     ` Mikko Rapeli

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.