All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-selinux][PATCH] conf/layer.conf: set BBFILES to known layers
@ 2018-01-16  8:54 Robert Yang
  2018-01-17  1:38 ` Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2018-01-16  8:54 UTC (permalink / raw)
  To: yocto, mark.hatle

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@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



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

* Re: [meta-selinux][PATCH] conf/layer.conf: set BBFILES to known layers
  2018-01-16  8:54 [meta-selinux][PATCH] conf/layer.conf: set BBFILES to known layers Robert Yang
@ 2018-01-17  1:38 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2018-01-17  1:38 UTC (permalink / raw)
  To: yocto, mark.hatle

I found that bitbake has BBFILES_DYNAMIC for such dynamic-layers,
I will send a V2.

// Robert

On 01/16/2018 04:54 PM, Robert Yang wrote:
> 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@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}/"
> 


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

end of thread, other threads:[~2018-01-17  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16  8:54 [meta-selinux][PATCH] conf/layer.conf: set BBFILES to known layers Robert Yang
2018-01-17  1:38 ` Robert Yang

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.