base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
PATCH 1/1 base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
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.
--- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/base.bbclass +1 -0
@@ -480,6 +480,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.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022')
Signature · 1 line
2.11.0
Quoted 29 lines · Mattias Hansson
do_prepare_recipe_sysrootmay perform groupadd, which requires pseudo. However,do_prepare_recipe_sysrootdoes 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_sysrootfor 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 <[email protected]>--- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/base.bbclass +1
-0@@ -480,6 +480,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.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022')Signature · 1 line
2.11.0
Ping. Just a friendly reminder for someone to take a look at this.
/Mattias
Quoted 19 lines · Mattias Hansson
do_prepare_recipe_sysrootmay perform groupadd, which requires pseudo. However,do_prepare_recipe_sysrootdoes 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_sysrootfor 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 <[email protected]>--- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/base.bbclass +0
-0
meta/classes/base.bbclass python () { · line 486
Quoted 7 lines
meta/classes/base.bbclass +1
-0@@ -480,6 +480,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.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022')
This basically forces all target recipes prepare-recipe sysroot to run under pseudo "just in case", with all the performance overhead that entails. prepare_recipe_sysroot does a lot of file accesses so this is significant. It will also increase the pseudo database sizes everywhere.
We'll need to find a better way to handle this I'm afraid.
Cheers,
Richard
Quoted 44 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 30 augusti 2019 18:50
To: Mattias Hansson <[email protected]>; openembedded- [email protected]
Cc: Mattias Hansson <[email protected]>
Subject: Re: [OE-core] [PATCH] base.bbclass: add dependency on pseudo fromdo_prepare_recipe_sysrootQuoted 19 lines · Mattias Hansson
do_prepare_recipe_sysrootmay perform groupadd, which requires pseudo. However,do_prepare_recipe_sysrootdoes 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_sysrootfor 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 <[email protected]>--- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/base.bbclass +0
-0meta/classes/base.bbclass python () { · line 486
Quoted 7 lines
meta/classes/base.bbclass +1
-0@@ -480,6 +480,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.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022')This basically forces all target recipes prepare-recipe sysroot to run under pseudo "just in case", with all the performance overhead that entails.
prepare_recipe_sysrootdoes a lot of file accesses so this is significant. It will also increase the pseudo database sizes everywhere.
Quoted 5 lines
We'll need to find a better way to handle this I'm afraid.
Cheers,
Richard
What do you prefer then, that we add this to useradd.bbclass instead?
python () {
# This corresponds to similar code in base.bbclass, but is added here as it # is only needed for recipes that add users/groups.
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
d.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1')}
}
That way it should only affect recipes that manipulate users/groups.
//Peter