summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd-staticids.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/useradd-staticids.bbclass')
-rw-r--r--meta/classes/useradd-staticids.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index eb8e59e67a..3d0bc09148 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -40,10 +40,14 @@ def update_useradd_static_config(d):
40 40
41 def handle_missing_id(id, type, pkg): 41 def handle_missing_id(id, type, pkg):
42 # For backwards compatibility we accept "1" in addition to "error" 42 # For backwards compatibility we accept "1" in addition to "error"
43 if d.getVar('USERADD_ERROR_DYNAMIC') == 'error' or d.getVar('USERADD_ERROR_DYNAMIC') == '1': 43 error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC')
44 raise NotImplementedError("%s - %s: %sname %s does not have a static ID defined. Skipping it." % (d.getVar('PN'), pkg, type, id)) 44 msg = "%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id)
45 elif d.getVar('USERADD_ERROR_DYNAMIC') == 'warn': 45 if error_dynamic == 'error' or error_dynamic == '1':
46 bb.warn("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id)) 46 raise NotImplementedError(msg)
47 elif error_dynamic == 'warn':
48 bb.warn(msg)
49 elif error_dynamic == 'skip':
50 raise bb.parse.SkipRecipe(msg)
47 51
48 # We parse and rewrite the useradd components 52 # We parse and rewrite the useradd components
49 def rewrite_useradd(params, is_pkg): 53 def rewrite_useradd(params, is_pkg):