diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/useradd-staticids.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass index 5897fed20d..3efe2a895a 100644 --- a/meta/classes/useradd-staticids.bbclass +++ b/meta/classes/useradd-staticids.bbclass | |||
@@ -134,8 +134,9 @@ def update_useradd_static_config(d): | |||
134 | break | 134 | break |
135 | 135 | ||
136 | # Should be an error if a specific option is set... | 136 | # Should be an error if a specific option is set... |
137 | if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and (not uaargs.uid or not uaargs.gid): | 137 | if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not ((uaargs.uid and uaargs.uid.isdigit()) and uaargs.gid): |
138 | raise bb.build.FuncFailed("%s - %s: Username %s does not have a static uid/gid defined." % (d.getVar('PN', True), pkg, uaargs.LOGIN)) | 138 | #bb.error("Skipping recipe %s, package %s which adds username %s does not have a static uid defined." % (d.getVar('PN', True), pkg, uaargs.LOGIN)) |
139 | raise bb.build.FuncFailed("%s - %s: Username %s does not have a static uid defined." % (d.getVar('PN', True), pkg, uaargs.LOGIN)) | ||
139 | 140 | ||
140 | # Reconstruct the args... | 141 | # Reconstruct the args... |
141 | newparam = ['', ' --defaults'][uaargs.defaults] | 142 | newparam = ['', ' --defaults'][uaargs.defaults] |
@@ -222,7 +223,8 @@ def update_useradd_static_config(d): | |||
222 | gaargs.gid = field[2] | 223 | gaargs.gid = field[2] |
223 | break | 224 | break |
224 | 225 | ||
225 | if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not gaargs.gid: | 226 | if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not (gaargs.gid and gaargs.gid.isdigit()): |
227 | #bb.error("Skipping recipe %s, package %s which adds groupname %s does not have a static gid defined." % (d.getVar('PN', True), pkg, gaargs.GROUP)) | ||
226 | raise bb.build.FuncFailed("%s - %s: Groupname %s does not have a static gid defined." % (d.getVar('PN', True), pkg, gaargs.GROUP)) | 228 | raise bb.build.FuncFailed("%s - %s: Groupname %s does not have a static gid defined." % (d.getVar('PN', True), pkg, gaargs.GROUP)) |
227 | 229 | ||
228 | # Reconstruct the args... | 230 | # Reconstruct the args... |