From: David Vincent Date: Mon, 23 Jan 2017 13:55:40 +0000 (+0100) Subject: useradd-staticids: Fix groupadd X-Git-Tag: uninative-1.5~601 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=5b84cc895500c28674d2a7b7c2dd618cf8fb30e9;p=openembedded-core.git useradd-staticids: Fix groupadd When a group name is duplicated between USERADD_PARAM and GROUPADD_PARAM, this class tries to add it twice which results in failure of the groupadd command. Signed-off-by: David Vincent Signed-off-by: Richard Purdie --- diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass index f7f6057ac3..a309b8873d 100644 --- a/meta/classes/useradd-staticids.bbclass +++ b/meta/classes/useradd-staticids.bbclass @@ -165,7 +165,9 @@ def update_useradd_static_config(d): if newgroup and is_pkg: groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg) if groupadd: - d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup)) + # Only add the group if not already specified + if not uaargs.groupname in groupadd: + d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup)) else: d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)