mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -107,11 +107,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" % bb.data.getVar('FILE', d)
|
||||
raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE')
|
||||
|
||||
for pkg in useradd_packages.split():
|
||||
if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True):
|
||||
raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package %s" % (bb.data.getVar('FILE', d), pkg)
|
||||
raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package %s" % (d.getVar('FILE'), pkg)
|
||||
|
||||
python __anonymous() {
|
||||
update_useradd_after_parse(d)
|
||||
@@ -147,12 +147,12 @@ fakeroot python populate_packages_prepend () {
|
||||
if not preinst:
|
||||
preinst = '#!/bin/sh\n'
|
||||
preinst += d.getVar('useradd_preinst', True)
|
||||
bb.data.setVar('pkg_preinst_%s' % pkg, preinst, d)
|
||||
d.setVar('pkg_preinst_%s' % pkg, preinst)
|
||||
|
||||
# RDEPENDS setup
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " base-passwd shadow"
|
||||
bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
# Add the user/group preinstall scripts and RDEPENDS requirements
|
||||
# to packages specified by USERADD_PACKAGES
|
||||
|
||||
Reference in New Issue
Block a user