classes/buildhistory: capture package config
PATCH 1/1 classes/buildhistory: capture package config
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.
--- meta/classes/buildhistory.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/buildhistory.bbclass +3 -0
@@ -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)
Signature · 1 line
2.27.0
Quoted 4 lines · 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.
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
Quoted 39 lines
Signed-off-by Jan Luebbe <[email protected]>--- meta/classes/buildhistory.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes/buildhistory.bbclass +3
-0@@ -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)Signature · 1 line
2.27.0
Hi,
Quoted 10 lines · On Mon, 2020-06-15 at 11:29 +0000, [email protected] wrote:
Quoted 6 lines · 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.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.
Quoted 2 lines
And this reminds me that
DISTRO_FEATURESisn'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
Quoted 2 lines
A generic approach for adding more variables to buildhistory would be nice.
Hi,
Quoted 9 lines · Jan Lübbe
Quoted 8 lines · On Mon, 2020-06-15 at 11:29 +0000, [email protected] wrote:
Quoted 6 lines · 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.
Quoted 8 lines
Quoted 2 lines
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.
Quoted 5 lines
Quoted 2 lines
And this reminds me that
DISTRO_FEATURESisn't logged into buildhistory either afaik...Might be useful, but
DISTRO_FEATURESis 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