]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
useradd: Ensure do_populate_sysroot has dependency on useradd variables
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 May 2019 16:45:57 +0000 (17:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Jun 2019 10:26:56 +0000 (11:26 +0100)
The do_populate_sysroot task doesn't rerun if you change any of the USERADD_PARAM
or GROUPADD_PARAM variables, only do_package will.

If another task depends on the recipe, this means it won't see any updated changes.

This patch adds in the missing vardeps ensuring the code is deterministic.

[YOCTO #13232]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd.bbclass

index 5e600dec849206b06769d3bb7bf97e730be9b4c4..e5f3ba24f9d22496efd9f5c418737e8c7296658a 100644 (file)
@@ -184,6 +184,7 @@ def update_useradd_after_parse(d):
         bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
 
     for pkg in useradd_packages.split():
+        d.appendVarFlag("do_populate_sysroot", "vardeps", "USERADD_PARAM_%s GROUPADD_PARAM_%s GROUPMEMS_PARAM_%s" % (pkg, pkg, pkg))
         if not d.getVar('USERADD_PARAM_%s' % pkg) and not d.getVar('GROUPADD_PARAM_%s' % pkg) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg):
             bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg))