meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)

sed \
 -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
 -i `grep -ril bb.data.expand *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2012-03-03 11:21:22 +00:00
parent 22f0df2aa7
commit b1aeaa8b0d
44 changed files with 129 additions and 129 deletions

View File

@@ -195,10 +195,10 @@ def splitfile(file, debugfile, debugsrcdir, d):
dvar = d.getVar('PKGD', True)
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
sourcefile = d.expand("${WORKDIR}/debugsources.list")
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -238,11 +238,11 @@ def splitfile2(debugsrcdir, d):
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
workbasedir = os.path.basename(workdir)
sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
sourcefile = d.expand("${WORKDIR}/debugsources.list")
if debugsrcdir:
nosuchdir = []
@@ -624,7 +624,7 @@ python fixup_perms () {
if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"):
bb.error("Fixup perms: %s invalid line: %s" % (conf, line))
continue
entry = fs_perms_entry(bb.data.expand(line, d))
entry = fs_perms_entry(d.expand(line))
if entry and entry.path:
fs_perms_table[entry.path] = entry
f.close()
@@ -1071,9 +1071,9 @@ python emit_pkgdata() {
pkgdatadir = d.getVar('PKGDESTWORK', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d), True)
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
data_file = pkgdatadir + bb.data.expand("/${PN}" , d)
data_file = pkgdatadir + d.expand("/${PN}" )
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
f.close()
@@ -1154,7 +1154,7 @@ python package_do_filedeps() {
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
rpmdeps = bb.data.expand("${RPMDEPS}", d)
rpmdeps = d.expand("${RPMDEPS}")
r = re.compile(r'[<>=]+ +[^ ]*')
# Quick routine to process the results of the rpmdeps call...
@@ -1253,7 +1253,7 @@ python package_do_shlibs() {
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
def linux_so(root, path, file):
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
@@ -1499,7 +1499,7 @@ python package_do_pkgconfig () {
if m:
name = m.group(1)
val = m.group(2)
pd.setVar(name, bb.data.expand(val, pd))
pd.setVar(name, pd.expand(val))
continue
m = field_re.match(l)
if m:
@@ -1509,7 +1509,7 @@ python package_do_pkgconfig () {
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
for pkg in packages.split():
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
@@ -1560,7 +1560,7 @@ python read_shlibdeps () {
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
depsfile = d.expand("${PKGDEST}/" + pkg + extension)
if os.access(depsfile, os.R_OK):
fd = file(depsfile)
lines = fd.readlines()