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/recipes-devtools/apt/apt-native.inc | 4 ++-- meta/recipes-devtools/apt/apt-package.inc | 8 ++++---- meta/recipes-devtools/automake/automake.inc | 2 +- meta/recipes-devtools/cmake/cmake.inc | 2 +- meta/recipes-devtools/cmake/cmake_2.8.5.bb | 6 +++--- meta/recipes-devtools/gcc/gcc-common.inc | 8 ++++---- meta/recipes-devtools/gcc/gcc-configure-common.inc | 2 +- meta/recipes-devtools/gnu-config/gnu-config_20080123.bb | 2 +- meta/recipes-devtools/intltool/intltool.inc | 2 +- meta/recipes-devtools/opkg/opkg.inc | 2 +- meta/recipes-devtools/perl/perl_5.14.2.bb | 2 +- meta/recipes-devtools/python/python-pygobject_2.27.91.bb | 2 +- meta/recipes-devtools/qemu/qemu-targets.inc | 2 +- meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc index b16f99e93c..d4b207b986 100644 --- a/meta/recipes-devtools/apt/apt-native.inc +++ b/meta/recipes-devtools/apt/apt-native.inc @@ -13,14 +13,14 @@ python do_install () { } python do_install_config () { - indir = os.path.dirname(bb.data.getVar('FILE',d,1)) + indir = os.path.dirname(d.getVar('FILE',1)) infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r') data = infile.read() infile.close() data = bb.data.expand(data, d) - outdir = os.path.join(bb.data.getVar('D', d, 1), bb.data.getVar('sysconfdir', d, 1), 'apt') + outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt') if not os.path.exists(outdir): os.makedirs(outdir) outpath = os.path.join(outdir, 'apt.conf.sample') diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc index 2e3be3885b..dde916e3da 100644 --- a/meta/recipes-devtools/apt/apt-package.inc +++ b/meta/recipes-devtools/apt/apt-package.inc @@ -59,15 +59,15 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \ ${localstatedir} ${sysconfdir} \ ${libdir}/dpkg" FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates" -FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} \ +FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', 1))} \ ${docdir}/apt" -FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}" +FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}" FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}" do_install () { set -x - ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} - ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))} + ${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', 1))} + ${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))} install -d ${D}${bindir} install -m 0755 bin/apt-cdrom ${D}${bindir}/ install -m 0755 bin/apt-get ${D}${bindir}/ diff --git a/meta/recipes-devtools/automake/automake.inc b/meta/recipes-devtools/automake/automake.inc index f217e1432b..370a972566 100644 --- a/meta/recipes-devtools/automake/automake.inc +++ b/meta/recipes-devtools/automake/automake.inc @@ -10,6 +10,6 @@ SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 " inherit autotools -export AUTOMAKE = "${@bb.which('automake', bb.data.getVar('PATH', d, 1))}" +export AUTOMAKE = "${@bb.which('automake', d.getVar('PATH', 1))}" FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*" diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc index ec37a101a3..8433c533b7 100644 --- a/meta/recipes-devtools/cmake/cmake.inc +++ b/meta/recipes-devtools/cmake/cmake.inc @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://Copyright.txt;md5=f372516292ff7c33337bf16a74a5f9a8 \ INC_PR = "r1" -CMAKE_MAJOR_VERSION = "${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}" +CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ file://support-oe-qt4-tools-names.patch" diff --git a/meta/recipes-devtools/cmake/cmake_2.8.5.bb b/meta/recipes-devtools/cmake/cmake_2.8.5.bb index 8e040728c9..3e2a218385 100644 --- a/meta/recipes-devtools/cmake/cmake_2.8.5.bb +++ b/meta/recipes-devtools/cmake/cmake_2.8.5.bb @@ -13,8 +13,8 @@ SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aac # Strip ${prefix} from ${docdir}, set result into docdir_stripped python () { - prefix=bb.data.getVar("prefix", d, 1) - docdir=bb.data.getVar("docdir", d, 1) + prefix=d.getVar("prefix", 1) + docdir=d.getVar("docdir", 1) if not docdir.startswith(prefix): raise bb.build.FuncFailed('docdir must contain prefix as its prefix') @@ -23,7 +23,7 @@ python () { if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': docdir_stripped = docdir_stripped[1:] - bb.data.setVar("docdir_stripped", docdir_stripped, d) + d.setVar("docdir_stripped", docdir_stripped) } EXTRA_OECMAKE=" \ diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index f83f4da798..69e0213e9f 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc @@ -7,17 +7,17 @@ NATIVEDEPS = "" inherit autotools gettext -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" +FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/gcc-${PV}" def get_gcc_fpu_setting(bb, d): - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + if d.getVar('TARGET_FPU', 1) in [ 'soft' ]: return "--with-float=soft" - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'ppc-efd' ]: + if d.getVar('TARGET_FPU', 1) in [ 'ppc-efd' ]: return "--enable-e500_double" return "" def get_gcc_mips_plt_setting(bb, d): - if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() : + if d.getVar('TARGET_ARCH', 1) in [ 'mips', 'mipsel' ] and 'mplt' in d.getVar('DISTRO_FEATURES',1).split() : return "--with-mips-plt" return "" diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 2ddc3d7c9f..ae23e8ee49 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -27,7 +27,7 @@ EXTRA_OECONF_INTERMEDIATE ?= "" GCCMULTILIB = "--disable-multilib" -EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \ +EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', 1) != 'no']} \ --with-gnu-ld \ --enable-shared \ --enable-languages=${LANGUAGES} \ diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb b/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb index de07f434b8..f93d342198 100644 --- a/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb +++ b/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb @@ -8,7 +8,7 @@ DEPENDS_virtclass-native = "perl-native-runtime" INHIBIT_DEFAULT_DEPS = "1" -FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}" +FIXEDSRCDATE = "${@d.getVar('FILE', 1).split('_')[-1].split('.')[0]}" PV = "0.1+cvs${FIXEDSRCDATE}" PR = "r4" diff --git a/meta/recipes-devtools/intltool/intltool.inc b/meta/recipes-devtools/intltool/intltool.inc index 23a1ee9774..8d983dfc6c 100644 --- a/meta/recipes-devtools/intltool/intltool.inc +++ b/meta/recipes-devtools/intltool/intltool.inc @@ -2,7 +2,7 @@ DESCRIPTION = "Utility scripts for internationalizing XML" SECTION = "devel" LICENSE = "GPLv2" -URLV="${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}" +URLV="${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" SRC_URI = "${GNOME_MIRROR}/intltool/${URLV}/intltool-${PV}.tar.bz2" S = "${WORKDIR}/intltool-${PV}" diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc index a649213916..3e350e8197 100644 --- a/meta/recipes-devtools/opkg/opkg.inc +++ b/meta/recipes-devtools/opkg/opkg.inc @@ -12,7 +12,7 @@ DEPENDS_virtclass-nativesdk = "curl-nativesdk" PE = "1" -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg" +FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg" # Werror gives all kinds bounds issuses with gcc 4.3.3 do_configure_prepend() { diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb index 788962638d..e864f1e436 100644 --- a/meta/recipes-devtools/perl/perl_5.14.2.bb +++ b/meta/recipes-devtools/perl/perl_5.14.2.bb @@ -285,7 +285,7 @@ FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore" # packages (actually the non modules packages and not created too) ALLOW_EMPTY_perl-modules = "1" PACKAGES_append = " perl-modules " -RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}" +RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', 1).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}" python populate_packages_prepend () { libdir = bb.data.expand('${libdir}/perl/${PV}', d) diff --git a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb index da4faec1ca..efc06b45c8 100644 --- a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb +++ b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb @@ -7,7 +7,7 @@ DEPENDS_virtclass-native = "glib-2.0-native" RDEPENDS_virtclass-native = "" PR = "r3" -MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" +MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2" diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc index 550a7fe1b5..1970dda55b 100644 --- a/meta/recipes-devtools/qemu/qemu-targets.inc +++ b/meta/recipes-devtools/qemu/qemu-targets.inc @@ -4,7 +4,7 @@ def get_qemu_target_list(d): import bb - archs = bb.data.getVar('QEMU_TARGETS', d, True).split() + archs = d.getVar('QEMU_TARGETS', True).split() targets = "" for arch in ['mips64', 'mips64el', 'ppcemb']: if arch in archs: diff --git a/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb b/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb index 29c7052056..eb80b54fc4 100644 --- a/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb +++ b/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb @@ -70,7 +70,7 @@ do_configure_prepend () { python __anonymous () { import re - pn = bb.data.getVar("PN", d, 1) + pn = d.getVar("PN", 1) if not pn.endswith('-native') and not pn.endswith('-nativesdk'): raise bb.parse.SkipPackage("unfs-server is intended for native/nativesdk builds only") } -- cgit v1.2.3-54-g00ecf