On Fri, 2024-02-23 at 11:16 +0000, Eilís 'pidge' Ní Fhlannagáin wrote:
> From: Piotr Łobacz <[email protected]>
> 
> postinst-useradd-* haven't been running in order of dependency.
> 
> This patch is reworked from Piotr Łobacz's patch and fixes:
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=15084
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13904
> 
> basepasswd_sysroot_postinst in base-passwd can install postinst-useradd-*
> scripts with any order. Sometimes this means, for example a useradd postinst
> will attempt to run without the corresponding group postinst causing errors.
> This patch ensures that we first run groupadd, then useradd and then
> group membership.
> 
> Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <[email protected]>
> ---
>  meta/classes-global/staging.bbclass |  7 +--
>  meta/classes/useradd.bbclass        | 72 ++++++++++++++++++-----------
>  2 files changed, 49 insertions(+), 30 deletions(-)
> 
> diff --git a/meta/classes-global/staging.bbclass 
> b/meta/classes-global/staging.bbclass
> index ab3e1d71b5..6c21510377 100644
> --- a/meta/classes-global/staging.bbclass
> +++ b/meta/classes-global/staging.bbclass
> @@ -245,8 +245,9 @@ def staging_populate_sysroot_dir(targetsysroot, 
> nativesysroot, native, d):
>                          continue
>  
>      staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
> -    for p in postinsts:
> -        bb.note("Running postinst {}, output:\n{}".format(p, 
> subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)))
> +    bb.warn(sorted(postinsts))
> +    for p in sorted(postinsts):
> +        bb.warn("Running postinst {}, output:\n{}".format(p, 
> subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)))
>  

bb.warn? Still?

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196071): 
https://lists.openembedded.org/g/openembedded-core/message/196071
Mute This Topic: https://lists.openembedded.org/mt/104526265/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to