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>
This commit is contained in:
Peter Kjellerstedt 2017-03-15 01:27:14 +01:00 committed by Richard Purdie
parent 6b5502566f
commit b2cd8759b1
1 changed files with 2 additions and 4 deletions

View File

@ -123,8 +123,7 @@ def update_useradd_static_config(d):
users = merge_files(get_passwd_list(d), 7)
if uaargs.LOGIN not in users:
if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
handle_missing_id(uaargs.LOGIN, 'user', pkg)
handle_missing_id(uaargs.LOGIN, 'user', pkg)
newparams.append(param)
continue
@ -259,8 +258,7 @@ def update_useradd_static_config(d):
groups = merge_files(get_group_list(d), 4)
if gaargs.GROUP not in groups:
if not gaargs.gid or not gaargs.gid.isdigit():
handle_missing_id(gaargs.GROUP, 'group', pkg)
handle_missing_id(gaargs.GROUP, 'group', pkg)
newparams.append(param)
continue