[yocto] [meta-selinux][PATCH] conf/layer.conf: set BBFILES to known layers
Robert Yang
liezhi.yang at windriver.com
Tue Jan 16 00:54:56 PST 2018
The previous code add all BBFILE_COLLECTIONS/recipes*/*/*.bbappend to BBFILES,
which causes the parsing very slow when there are many layers, e.g., I have 87
layers:
* Before:
$ rm -fr tmp-glibc/ cache; time bitbake -p
real 0m45.173s
user 0m0.560s
sys 0m0.060s
* After:
$ rm -fr tmp-glibc/ cache; time bitbake -p
real 0m25.542s
user 0m0.572s
sys 0m0.040s
It cost 20s which isn't worth (The host has 128 threads, it should cost more
time on less power host), only set BBFILES according to known layers (currently:
meta-python, networking-layer and virtualization-layer) can fix the problem.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
conf/layer.conf | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/conf/layer.conf b/conf/layer.conf
index f773dc3..0ad766c 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -8,7 +8,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
# Let us add layer-specific bbappends which are only applied when that
# layer is included in our configuration
BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
- for layer in BBFILE_COLLECTIONS.split())}"
+ for layer in set(BBFILE_COLLECTIONS.split()) & \
+ set(['meta-python', 'networking-layer', 'virtualization-layer']))}"
BBFILE_COLLECTIONS += "selinux"
BBFILE_PATTERN_selinux = "^${LAYERDIR}/"
--
2.7.4
More information about the yocto
mailing list