mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
meta: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -150,11 +150,11 @@ def update_useradd_after_parse(d):
|
||||
useradd_packages = d.getVar('USERADD_PACKAGES', True)
|
||||
|
||||
if not useradd_packages:
|
||||
raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE'))
|
||||
raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
|
||||
|
||||
for pkg in useradd_packages.split():
|
||||
if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
|
||||
bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), 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))
|
||||
|
||||
python __anonymous() {
|
||||
if not bb.data.inherits_class('nativesdk', d) \
|
||||
@@ -202,10 +202,10 @@ fakeroot python populate_packages_prepend () {
|
||||
|
||||
# RDEPENDS setup
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow'
|
||||
# base-files is where the default /etc/skel is packaged
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'base-files'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-files'
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
# Add the user/group preinstall scripts and RDEPENDS requirements
|
||||
|
||||
Reference in New Issue
Block a user