summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-07-28 11:43:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-01 11:47:13 +0100
commita9aef4087b0755286b998fb3a0e4d81157236644 (patch)
tree34c666ce70d80c0e8e1f804216867d4521c86089
parent1981ab0829911ac91983babd1fab71093999b621 (diff)
downloadpoky-a9aef4087b0755286b998fb3a0e4d81157236644.tar.gz
useradd-staticids.bbclass: trigger reparsing when table files change
This addresses (among others) the following problem: - USERADD_ERROR_DYNAMIC=error causes a recipe to get skipped because a static ID entry is missing - the entry gets added to the file - using the recipe still fails with the same error as before because the recipe gets loaded from the cache instead of re-parsing it with the new table content (From OE-Core rev: 799c93592a9aac571d6dc05529437c0eec7b08b8) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/useradd-staticids.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index 149245b292..46d4a4b3da 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -285,6 +285,19 @@ def update_useradd_static_config(d):
285 285
286 return ";".join(newparams).strip() 286 return ";".join(newparams).strip()
287 287
288 # The parsing of the current recipe depends on the content of
289 # the files listed in USERADD_UID/GID_TABLES. We need to tell bitbake
290 # about that explicitly to trigger re-parsing and thus re-execution of
291 # this code when the files change.
292 bbpath = d.getVar('BBPATH', True)
293 for varname, default in (('USERADD_UID_TABLES', 'files/passwd'),
294 ('USERADD_GID_TABLES', 'files/group')):
295 tables = d.getVar(varname, True)
296 if not tables:
297 tables = default
298 for conf_file in tables.split():
299 bb.parse.mark_dependency(d, bb.utils.which(bbpath, conf_file))
300
288 # Load and process the users and groups, rewriting the adduser/addgroup params 301 # Load and process the users and groups, rewriting the adduser/addgroup params
289 useradd_packages = d.getVar('USERADD_PACKAGES', True) 302 useradd_packages = d.getVar('USERADD_PACKAGES', True)
290 303