public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Eilís 'pidge' Ní Fhlannagáin" <pidge@baylibre.com>,
	openembedded-core@lists.openembedded.org
Cc: "Piotr Łobacz" <p.lobacz@welotec.com>
Subject: Re: [OE-core] [PATCH v2 1/3] useradd.bbclass: Fix order of postinst-useradd-*
Date: Fri, 23 Feb 2024 12:04:04 +0000	[thread overview]
Message-ID: <a19489be7a3fbee8fc4217124c69bdea0710c9f2.camel@linuxfoundation.org> (raw)
In-Reply-To: <5ffe6e8ddd120cd6ac113fd2cf5d1e557974f64e.1708686845.git.pidge@baylibre.com>

On Fri, 2024-02-23 at 11:16 +0000, Eilís 'pidge' Ní Fhlannagáin wrote:
> From: Piotr Łobacz <p.lobacz@welotec.com>
> 
> 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 <pidge@baylibre.com>
> ---
>  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


  reply	other threads:[~2024-02-23 12:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 11:16 [PATCH v2 0/3] Useradd postinstall fixes and tests Eilís 'pidge' Ní Fhlannagáin
2024-02-23 11:16 ` [PATCH v2 1/3] useradd.bbclass: Fix order of postinst-useradd-* Eilís 'pidge' Ní Fhlannagáin
2024-02-23 12:04   ` Richard Purdie [this message]
2024-02-23 11:16 ` [PATCH v2 2/3] selftest-users: Convoluted selftest for USERADD_DEPENDS Eilís 'pidge' Ní Fhlannagáin
2024-02-23 11:16 ` [PATCH v2 3/3] creategroup*: Remove coreutils-native as a DEPENDS Eilís 'pidge' Ní Fhlannagáin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a19489be7a3fbee8fc4217124c69bdea0710c9f2.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=p.lobacz@welotec.com \
    --cc=pidge@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox