summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd-staticids.bbclass
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:44:27 +0000
commitfdaa2d181d29dd2198248b011279e2b6acb12f2d (patch)
treea5016b414da67b90b9b9a3085ef7241c20414b36 /meta/classes/useradd-staticids.bbclass
parent0eafcc05d83da3a0add0d116fe239b528c144f15 (diff)
downloadpoky-fdaa2d181d29dd2198248b011279e2b6acb12f2d.tar.gz
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. (From OE-Core rev: 5b84cc895500c28674d2a7b7c2dd618cf8fb30e9) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd-staticids.bbclass')
-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):
165 if newgroup and is_pkg: 165 if newgroup and is_pkg:
166 groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg) 166 groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg)
167 if groupadd: 167 if groupadd:
168 d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup)) 168 # Only add the group if not already specified
169 if not uaargs.groupname in groupadd:
170 d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
169 else: 171 else:
170 d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup) 172 d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
171 173