From b1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Mar 2012 11:21:22 +0000 Subject: 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 --- meta/lib/oe/data.py | 2 +- meta/lib/oe/packagedata.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py index af900be6e4..e50f453de5 100644 --- a/meta/lib/oe/data.py +++ b/meta/lib/oe/data.py @@ -7,7 +7,7 @@ def typed_value(key, d): var_type = d.getVarFlag(key, 'type') flags = d.getVarFlags(key) if flags is not None: - flags = dict((flag, bb.data.expand(value, d)) + flags = dict((flag, d.expand(value)) for flag, value in flags.iteritems()) else: flags = {} diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 918e7ad2cc..a7a40f0d06 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py @@ -26,15 +26,15 @@ def read_pkgdatafile(fn): return pkgdata def get_subpkgedata_fn(pkg, d): - archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") + archs = d.expand("${PACKAGE_ARCHS}").split(" ") archs.reverse() - pkgdata = bb.data.expand('${TMPDIR}/pkgdata/', d) - targetdir = bb.data.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/', d) + pkgdata = d.expand('${TMPDIR}/pkgdata/') + targetdir = d.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/') for arch in archs: fn = pkgdata + arch + targetdir + pkg if os.path.exists(fn): return fn - return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) + return d.expand('${PKGDATA_DIR}/runtime/%s' % pkg) def has_subpkgdata(pkg, d): return os.access(get_subpkgedata_fn(pkg, d), os.R_OK) @@ -43,11 +43,11 @@ def read_subpkgdata(pkg, d): return read_pkgdatafile(get_subpkgedata_fn(pkg, d)) def has_pkgdata(pn, d): - fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) + fn = d.expand('${PKGDATA_DIR}/%s' % pn) return os.access(fn, os.R_OK) def read_pkgdata(pn, d): - fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) + fn = d.expand('${PKGDATA_DIR}/%s' % pn) return read_pkgdatafile(fn) # -- cgit v1.2.3-54-g00ecf