summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-18 15:14:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:57:25 +0100
commit86d30d756a60d181a95cf07041920a367a0cd0ba (patch)
tree950353e2e1cd1e7b812ff941b4d06076acd2c752 /meta/classes/useradd.bbclass
parentf98c8490099a02c42306e1671579631a61c9df73 (diff)
downloadpoky-86d30d756a60d181a95cf07041920a367a0cd0ba.tar.gz
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>
Diffstat (limited to 'meta/classes/useradd.bbclass')
-rw-r--r--meta/classes/useradd.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index eb82b00473..aae038f6ba 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -150,11 +150,11 @@ def update_useradd_after_parse(d):
150 useradd_packages = d.getVar('USERADD_PACKAGES', True) 150 useradd_packages = d.getVar('USERADD_PACKAGES', True)
151 151
152 if not useradd_packages: 152 if not useradd_packages:
153 raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE')) 153 raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
154 154
155 for pkg in useradd_packages.split(): 155 for pkg in useradd_packages.split():
156 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): 156 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):
157 bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg)) 157 bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg))
158 158
159python __anonymous() { 159python __anonymous() {
160 if not bb.data.inherits_class('nativesdk', d) \ 160 if not bb.data.inherits_class('nativesdk', d) \
@@ -202,10 +202,10 @@ fakeroot python populate_packages_prepend () {
202 202
203 # RDEPENDS setup 203 # RDEPENDS setup
204 rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or "" 204 rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
205 rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd' 205 rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd'
206 rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow' 206 rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow'
207 # base-files is where the default /etc/skel is packaged 207 # base-files is where the default /etc/skel is packaged
208 rdepends += ' ' + d.getVar('MLPREFIX') + 'base-files' 208 rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-files'
209 d.setVar("RDEPENDS_%s" % pkg, rdepends) 209 d.setVar("RDEPENDS_%s" % pkg, rdepends)
210 210
211 # Add the user/group preinstall scripts and RDEPENDS requirements 211 # Add the user/group preinstall scripts and RDEPENDS requirements