diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-03-15 01:27:14 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:20 +0000 |
| commit | b2cd8759b16167d1a983d72a5494f5a213de9b54 (patch) | |
| tree | d373f18202735eb0480d5361f866e0df82d132f1 /meta/classes/useradd-staticids.bbclass | |
| parent | 6b5502566fa9e3b6313cf40cd62b4e846f1e5103 (diff) | |
| download | poky-b2cd8759b16167d1a983d72a5494f5a213de9b54.tar.gz | |
useradd-staticids.bbclass: Always fail/warn for missing IDs
Previously, with USERADD_ERROR_DYNAMIC set to error/warn, if a static
UID/GID was specified in the recipe, then no error/warning would be
issued even if no ID was specified in the passwd/groups files.
(From OE-Core rev: 8e4b4e28a7c3a9dbd6b9298bea5d2c1328b3f24a)
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/useradd-staticids.bbclass')
| -rw-r--r-- | meta/classes/useradd-staticids.bbclass | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass index 9b194df490..c156a12ee5 100644 --- a/meta/classes/useradd-staticids.bbclass +++ b/meta/classes/useradd-staticids.bbclass | |||
| @@ -123,8 +123,7 @@ def update_useradd_static_config(d): | |||
| 123 | users = merge_files(get_passwd_list(d), 7) | 123 | users = merge_files(get_passwd_list(d), 7) |
| 124 | 124 | ||
| 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 | handle_missing_id(uaargs.LOGIN, 'user', pkg) |
| 127 | handle_missing_id(uaargs.LOGIN, 'user', pkg) | ||
| 128 | newparams.append(param) | 127 | newparams.append(param) |
| 129 | continue | 128 | continue |
| 130 | 129 | ||
| @@ -259,8 +258,7 @@ def update_useradd_static_config(d): | |||
| 259 | groups = merge_files(get_group_list(d), 4) | 258 | groups = merge_files(get_group_list(d), 4) |
| 260 | 259 | ||
| 261 | if gaargs.GROUP not in groups: | 260 | if gaargs.GROUP not in groups: |
| 262 | if not gaargs.gid or not gaargs.gid.isdigit(): | 261 | handle_missing_id(gaargs.GROUP, 'group', pkg) |
| 263 | handle_missing_id(gaargs.GROUP, 'group', pkg) | ||
| 264 | newparams.append(param) | 262 | newparams.append(param) |
| 265 | continue | 263 | continue |
| 266 | 264 | ||
