From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 2/5] useradd_base.bbclass: Remove perform_groupmems()
Date: Tue, 25 Aug 2026 20:08:02 +0200 [thread overview]
Message-ID: <20260825180805.2990506-2-pkj@axis.com> (raw)
In-Reply-To: <20260825180805.2990506-1-pkj@axis.com>
It is no longer used after support for GROUPMEMS_PARAM was removed from
useradd.bbclass.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes/useradd_base.bbclass | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index 5e12880b64..efc9d0a096 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -50,32 +50,6 @@ perform_useradd () {
fi
}
-perform_groupmems () {
- local rootdir="$1"
- local opts="$2"
- bbnote "${PN}: Performing groupmems with [$opts]"
- local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
- local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
- local prefix=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-P" || $i == "--prefix") print $(i+1) }'`
- if test "x$groupname" = "x"; then
- bbfatal "${PN}: groupmems: No user specified using --add."
-
- elif test "x$username" = "x"; then
- bbfatal "${PN}: groupmems: No group specified using --group."
- fi
- bbnote "${PN}: Emulating groupmems command using usermod with group $groupname and user $username"
- local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
- if test "x$mem_exists" = "x"; then
- eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO usermod \${prefix:+--prefix \$prefix} --append --groups \$groupname \$username\" || true
- mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*$" $rootdir/etc/group || true`"
- if test "x$mem_exists" = "x"; then
- bbfatal "${PN}: groupmems command (emulated using usermod) did not succeed."
- fi
- else
- bbnote "${PN}: group $groupname already contains $username, not re-adding it"
- fi
-}
-
perform_groupdel () {
local rootdir="$1"
local opts="$2"
next prev parent reply other threads:[~2026-08-25 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 18:08 [PATCH 1/5] useradd.bbclass: Remove support for the GROUPMEMS_PARAM variable Peter Kjellerstedt
2026-08-25 18:08 ` Peter Kjellerstedt [this message]
2026-08-25 18:08 ` [PATCH 3/5] useradd-staticids.bbclass: Remove references to GROUPMEMS_PARAM Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 4/5] package.bbclass: Remove GROUPMEMS_PARAM from PACKAGEVARS Peter Kjellerstedt
2026-08-25 18:08 ` [PATCH 5/5] documentation.conf: Remove the documentation of GROUPMEMS_PARAM Peter Kjellerstedt
2026-08-27 9:23 ` [OE-core] " Yoann Congal
2026-08-28 9:56 ` Peter Kjellerstedt
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=20260825180805.2990506-2-pkj@axis.com \
--to=pkj@axis.com \
--cc=openembedded-core@lists.openembedded.org \
/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