[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH] useradd: Ensure do_populate_sysroot has dependency on useradd variables
From:       Richard Purdie <richard.purdie () linuxfoundation ! org>
Date:       2019-05-31 16:48:42
Message-ID: 20190531164842.31374-1-richard.purdie () linuxfoundation ! org
[Download RAW message or body]

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 5e600dec849..e5f3ba24f9d 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -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))  
-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic