From c8dee9b92dfd545852ecac8dc2adfc95ac02e957 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 9 Nov 2011 15:00:01 +0000 Subject: 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 --- meta/classes/image.bbclass | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'meta/classes/image.bbclass') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 14726d2537..4642fa63e2 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -74,17 +74,17 @@ IMAGE_TYPE = ${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)} inherit image-${IMAGE_TYPE} python () { - deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or "" - for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): - for dep in ((bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "").split() or []): + deps = d.getVarFlag('do_rootfs', 'depends') or "" + for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): + for dep in ((d.getVar('IMAGE_DEPENDS_%s' % type) or "").split() or []): deps += " %s:do_populate_sysroot" % dep - for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): + for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split(): deps += " %s:do_populate_sysroot" % dep - bb.data.setVarFlag('do_rootfs', 'depends', deps, d) + d.setVarFlag('do_rootfs', 'depends', deps) # If we don't do this we try and run the mapping hooks while parsing which is slow # bitbake should really provide something to let us know this... - if bb.data.getVar('BB_WORKERCONTEXT', d, True) is not None: + if d.getVar('BB_WORKERCONTEXT', True) is not None: runtime_mapping_rename("PACKAGE_INSTALL", d) runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) } @@ -98,15 +98,15 @@ python () { # is searched for in the BBPATH (same as the old version.) # def get_devtable_list(d): - devtable = bb.data.getVar('IMAGE_DEVICE_TABLE', d, 1) + devtable = d.getVar('IMAGE_DEVICE_TABLE', 1) if devtable != None: return devtable str = "" - devtables = bb.data.getVar('IMAGE_DEVICE_TABLES', d, 1) + devtables = d.getVar('IMAGE_DEVICE_TABLES', 1) if devtables == None: devtables = 'files/device_table-minimal.txt' for devtable in devtables.split(): - str += " %s" % bb.which(bb.data.getVar('BBPATH', d, 1), devtable) + str += " %s" % bb.which(d.getVar('BBPATH', 1), devtable) return str IMAGE_CLASSES ?= "image_types" @@ -119,7 +119,7 @@ ROOTFS_POSTPROCESS_COMMAND ?= "" # some default locales IMAGE_LINGUAS ?= "de-de fr-fr en-gb" -LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}" +LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', 1).split()))}" do_rootfs[nostamp] = "1" do_rootfs[dirs] = "${TOPDIR}" -- cgit v1.2.3-54-g00ecf