summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorDavid Vincent <freesilicon@gmail.com>2017-01-23 14:55:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-26 10:41:10 +0000
commit5b84cc895500c28674d2a7b7c2dd618cf8fb30e9 (patch)
tree33669536bb99974a2251a484b27ee0226e0681a4 /meta
parente47fb403c2cb472d2666ed3ba4b10933467c8c7b (diff)
downloadopenembedded-core-5b84cc895500c28674d2a7b7c2dd618cf8fb30e9.tar.gz
openembedded-core-5b84cc895500c28674d2a7b7c2dd618cf8fb30e9.tar.bz2
openembedded-core-5b84cc895500c28674d2a7b7c2dd618cf8fb30e9.zip
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 <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/useradd-staticids.bbclass4
1 files changed, 3 insertions, 1 deletions
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)