[OE-core] [PATCH] base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot

Mattias Hansson mattias.hansson at axis.com
Tue Oct 15 11:45:50 UTC 2019


On Tue, Oct 15, 2019 at 10:27:27AM +0200, Richard Purdie wrote:
> On Tue, 2019-10-15 at 10:00 +0200, Mattias Hansson wrote:
> > do_prepare_recipe_sysroot may perform groupadd, which requires pseudo.
> > However, do_prepare_recipe_sysroot does not depend on pseudo explicitly,
> > which sometimes causes a build error when building a recipe that adds
> > groups.
> > 
> > This issue only occurs when executing do_prepare_recipe_sysroot for a
> > recipe that adds groups before finishing a task that depends on pseudo
> > for a recipe that doesn't add groups.
> > 
> > Signed-off-by: Mattias Hansson <mattihn at axis.com>
> > ---
> >  meta/classes/base.bbclass | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> > index d3184ecf7b..1cea3a2213 100644
> > --- a/meta/classes/base.bbclass
> > +++ b/meta/classes/base.bbclass
> > @@ -482,6 +482,7 @@ python () {
> >      # If we're building a target package we need to use fakeroot (pseudo)
> >      # in order to capture permissions, owners, groups and special files
> >      if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
> > +        d.appendVarFlag('do_prepare_recipe_sysroot', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
> >          d.setVarFlag('do_unpack', 'umask', '022')
> >          d.setVarFlag('do_configure', 'umask', '022')
> >          d.setVarFlag('do_compile', 'umask', '022')
> 
> This was posted once already and the answer is still no, we do not want
> to add pseudo as a dependency for all sysroot construction. IO under
> pseudo is much slower and this is a very IO intensive task so it would
> hurt performance and isn't necessary in most cases.
> 
> I appreciate its harder but we need to find a better more targeted way
> to solve this and some of the other related pseudo issues for inter
> dependent user/groups.
> 
> Cheers,
> 
> RIchard
> 

Sorry for the confusion, but this is a different patch. The previous
forced do_prepare_recipe_sysroot to run in a fakerooted environment.
This caused a performance degrade and was therefore rejected, if I
understood you correctly.

This patch will only declare fakeroot-native as a dependency and only
cause pseudo to be available during do_prepare_recipe_sysroot. This
should not cause the task to run in a fakerooted environment, is this a
valid assumption?

/Mattias


More information about the Openembedded-core mailing list