summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd-staticids.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:28:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commitbb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch)
tree76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/classes/useradd-staticids.bbclass
parentfcc456ee4b8f619134abb4649db53c638074082c (diff)
downloadpoky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd-staticids.bbclass')
-rw-r--r--meta/classes/useradd-staticids.bbclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 3a1b5f1320..8e2a7fb635 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -77,7 +77,7 @@ def update_useradd_static_config(d):
77 try: 77 try:
78 uaargs = parser.parse_args(oe.useradd.split_args(param)) 78 uaargs = parser.parse_args(oe.useradd.split_args(param))
79 except Exception as e: 79 except Exception as e:
80 bb.fatal("%s: Unable to parse arguments for USERADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e)) 80 bb.fatal("%s: Unable to parse arguments for USERADD_PARAM:%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
81 81
82 # Read all passwd files specified in USERADD_UID_TABLES or files/passwd 82 # Read all passwd files specified in USERADD_UID_TABLES or files/passwd
83 # Use the standard passwd layout: 83 # Use the standard passwd layout:
@@ -140,13 +140,13 @@ def update_useradd_static_config(d):
140 uaargs.gid = uaargs.groupid 140 uaargs.gid = uaargs.groupid
141 uaargs.user_group = None 141 uaargs.user_group = None
142 if newgroup and is_pkg: 142 if newgroup and is_pkg:
143 groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg) 143 groupadd = d.getVar("GROUPADD_PARAM:%s" % pkg)
144 if groupadd: 144 if groupadd:
145 # Only add the group if not already specified 145 # Only add the group if not already specified
146 if not uaargs.groupname in groupadd: 146 if not uaargs.groupname in groupadd:
147 d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup)) 147 d.setVar("GROUPADD_PARAM:%s" % pkg, "%s; %s" % (groupadd, newgroup))
148 else: 148 else:
149 d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup) 149 d.setVar("GROUPADD_PARAM:%s" % pkg, newgroup)
150 150
151 uaargs.comment = "'%s'" % field[4] if field[4] else uaargs.comment 151 uaargs.comment = "'%s'" % field[4] if field[4] else uaargs.comment
152 uaargs.home_dir = field[5] or uaargs.home_dir 152 uaargs.home_dir = field[5] or uaargs.home_dir
@@ -198,7 +198,7 @@ def update_useradd_static_config(d):
198 # If we're processing multiple lines, we could have left over values here... 198 # If we're processing multiple lines, we could have left over values here...
199 gaargs = parser.parse_args(oe.useradd.split_args(param)) 199 gaargs = parser.parse_args(oe.useradd.split_args(param))
200 except Exception as e: 200 except Exception as e:
201 bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM_%s '%s': %s" % (d.getVar('PN'), pkg, param, e)) 201 bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM:%s '%s': %s" % (d.getVar('PN'), pkg, param, e))
202 202
203 # Read all group files specified in USERADD_GID_TABLES or files/group 203 # Read all group files specified in USERADD_GID_TABLES or files/group
204 # Use the standard group layout: 204 # Use the standard group layout:
@@ -265,17 +265,17 @@ def update_useradd_static_config(d):
265 for pkg in useradd_packages.split(): 265 for pkg in useradd_packages.split():
266 # Groupmems doesn't have anything we might want to change, so simply validating 266 # Groupmems doesn't have anything we might want to change, so simply validating
267 # is a bit of a waste -- only process useradd/groupadd 267 # is a bit of a waste -- only process useradd/groupadd
268 useradd_param = d.getVar('USERADD_PARAM_%s' % pkg) 268 useradd_param = d.getVar('USERADD_PARAM:%s' % pkg)
269 if useradd_param: 269 if useradd_param:
270 #bb.warn("Before: 'USERADD_PARAM_%s' - '%s'" % (pkg, useradd_param)) 270 #bb.warn("Before: 'USERADD_PARAM:%s' - '%s'" % (pkg, useradd_param))
271 d.setVar('USERADD_PARAM_%s' % pkg, rewrite_useradd(useradd_param, True)) 271 d.setVar('USERADD_PARAM:%s' % pkg, rewrite_useradd(useradd_param, True))
272 #bb.warn("After: 'USERADD_PARAM_%s' - '%s'" % (pkg, d.getVar('USERADD_PARAM_%s' % pkg))) 272 #bb.warn("After: 'USERADD_PARAM:%s' - '%s'" % (pkg, d.getVar('USERADD_PARAM:%s' % pkg)))
273 273
274 groupadd_param = d.getVar('GROUPADD_PARAM_%s' % pkg) 274 groupadd_param = d.getVar('GROUPADD_PARAM:%s' % pkg)
275 if groupadd_param: 275 if groupadd_param:
276 #bb.warn("Before: 'GROUPADD_PARAM_%s' - '%s'" % (pkg, groupadd_param)) 276 #bb.warn("Before: 'GROUPADD_PARAM:%s' - '%s'" % (pkg, groupadd_param))
277 d.setVar('GROUPADD_PARAM_%s' % pkg, rewrite_groupadd(groupadd_param, True)) 277 d.setVar('GROUPADD_PARAM:%s' % pkg, rewrite_groupadd(groupadd_param, True))
278 #bb.warn("After: 'GROUPADD_PARAM_%s' - '%s'" % (pkg, d.getVar('GROUPADD_PARAM_%s' % pkg))) 278 #bb.warn("After: 'GROUPADD_PARAM:%s' - '%s'" % (pkg, d.getVar('GROUPADD_PARAM:%s' % pkg)))
279 279
280 # Load and process extra users and groups, rewriting only adduser/addgroup params 280 # Load and process extra users and groups, rewriting only adduser/addgroup params
281 pkg = d.getVar('PN') 281 pkg = d.getVar('PN')