diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-03-15 01:27:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:20 +0000 |
commit | 6b5502566fa9e3b6313cf40cd62b4e846f1e5103 (patch) | |
tree | b864a1e69c031874e492c2cf3cbe9d3c712ecb36 /meta/classes | |
parent | b1f10b18eaf6c8009e86863ca4a26f429de97082 (diff) | |
download | poky-6b5502566fa9e3b6313cf40cd62b4e846f1e5103.tar.gz |
useradd-staticids.bbclass: Support recipes specifying static IDs
If this bbclass is used and a recipe specifies a static ID for a
user/group as part of the USERADD_PARAM_${PN} or GROUPADD_PARAM_${PN},
the build would fail with and error like this if there was no
corresponding ID in the passwd/group files specified via
USERADD_UID_TABLES/USERADD_GID_TABLES:
ERROR: meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb:
meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb inherits
useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
GROUPMEMS_PARAM for package postgresql
(From OE-Core rev: e744fac05fc5cc19cabc59c1e79ff4c1b3ee396d)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/useradd-staticids.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass index a65c3f69cb..9b194df490 100644 --- a/meta/classes/useradd-staticids.bbclass +++ b/meta/classes/useradd-staticids.bbclass | |||
@@ -125,6 +125,7 @@ def update_useradd_static_config(d): | |||
125 | if uaargs.LOGIN not in users: | 125 | if uaargs.LOGIN not in users: |
126 | if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid: | 126 | if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid: |
127 | handle_missing_id(uaargs.LOGIN, 'user', pkg) | 127 | handle_missing_id(uaargs.LOGIN, 'user', pkg) |
128 | newparams.append(param) | ||
128 | continue | 129 | continue |
129 | 130 | ||
130 | field = users[uaargs.LOGIN] | 131 | field = users[uaargs.LOGIN] |
@@ -260,6 +261,7 @@ def update_useradd_static_config(d): | |||
260 | if gaargs.GROUP not in groups: | 261 | if gaargs.GROUP not in groups: |
261 | if not gaargs.gid or not gaargs.gid.isdigit(): | 262 | if not gaargs.gid or not gaargs.gid.isdigit(): |
262 | handle_missing_id(gaargs.GROUP, 'group', pkg) | 263 | handle_missing_id(gaargs.GROUP, 'group', pkg) |
264 | newparams.append(param) | ||
263 | continue | 265 | continue |
264 | 266 | ||
265 | field = groups[gaargs.GROUP] | 267 | field = groups[gaargs.GROUP] |