[oe-commits] [openembedded-core] 54/64: buildhistory.bbclass: add layer name to source recipe data
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 21 21:12:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 28c321f8eb03e304a72d3bc980c36e6d08fe3b8b
Author: Mikko Rapeli <mikko.rapeli at bmw.de>
AuthorDate: Tue Mar 21 12:53:13 2017 +0200
buildhistory.bbclass: add layer name to source recipe data
It is useful to know which layer provided a given recipe and its
binary packages.
Many projects combine a number of layers and some of them
also provide same recipe names in which case bitbake
can prioritize between them. buildhistory can record
the decision by saving the layer from where the recipe
was taken from.
Also, if a project is split to sub projects which maintain
recipes in different meta layers, then meta layer specific
summaries of e.g. disk usage can be calculated if
source recipes meta layer name is recorded for example in
buildhistory.
If source layer is not in build history, then layer providing
the recipe can be exported from build environment using
'bitbake-layers show-recipes', but it takes a long time to execute
since all recipes are parsed again and requires full source tree
with correct build configuration.
This patch exports the name of layer as configured in BBFILE_COLLECTIONS
append of its layer.conf. 'bitbake-layers show-recipes' exports the
meta layers directory path name. For several open source layers
these are different, e.g. meta-openembedded/meta-perl/conf/layer.conf
is perl-layer, poky/meta/conf/layer.conf is core,
poky/meta-skeleton/conf/layer.conf is skeleton etc.
Signed-off-by: Mikko Rapeli <mikko.rapeli at bmw.de>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/buildhistory.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index bf5789e..109b375 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -86,6 +86,7 @@ python buildhistory_emit_pkghistory() {
self.depends = ""
self.packages = ""
self.srcrev = ""
+ self.layer = ""
class PackageInfo:
@@ -186,6 +187,7 @@ python buildhistory_emit_pkghistory() {
pe = d.getVar('PE') or "0"
pv = d.getVar('PV')
pr = d.getVar('PR')
+ layer = bb.utils.get_file_layer(d.getVar('FILE', True), d)
pkgdata_dir = d.getVar('PKGDATA_DIR')
packages = ""
@@ -225,6 +227,7 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pr = pr
rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS') or ""))
rcpinfo.packages = packages
+ rcpinfo.layer = layer
write_recipehistory(rcpinfo, d)
pkgdest = d.getVar('PKGDEST')
@@ -303,6 +306,7 @@ def write_recipehistory(rcpinfo, d):
f.write(u"PR = %s\n" % rcpinfo.pr)
f.write(u"DEPENDS = %s\n" % rcpinfo.depends)
f.write(u"PACKAGES = %s\n" % rcpinfo.packages)
+ f.write(u"LAYER = %s\n" % rcpinfo.layer)
def write_pkghistory(pkginfo, d):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list