summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-03 10:59:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-05 10:33:18 -0800
commit41bc192c0b5795561b239872008c91a867732219 (patch)
treea21feb51bde721ba553296676ce4b5ea2662bf37 /meta/recipes-devtools
parent3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff)
downloadopenembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz
openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.bz2
openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.xz
openembedded-core-41bc192c0b5795561b239872008c91a867732219.zip
meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc8
-rw-r--r--meta/recipes-devtools/automake/automake.inc2
-rw-r--r--meta/recipes-devtools/cmake/cmake_2.8.5.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc6
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc2
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.3.bb2
-rw-r--r--meta/recipes-devtools/perl/perl_5.14.2.bb2
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb2
9 files changed, 15 insertions, 15 deletions
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 4ca022398..4bf5105dd 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -20,7 +20,7 @@ python do_install_config () {
data = bb.data.expand(data, d)
- outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt')
+ outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), '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 d644b0974..736672c26 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, d.getVar('apt-manpages', 1))} \
+FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
${docdir}/apt"
-FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}"
+FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
- ${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', 1))}
- ${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}
+ ${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', True))}
+ ${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}
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 c259673d2..7eef9ec7b 100644
--- a/meta/recipes-devtools/automake/automake.inc
+++ b/meta/recipes-devtools/automake/automake.inc
@@ -9,6 +9,6 @@ SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 "
inherit autotools
-export AUTOMAKE = "${@bb.which('automake', d.getVar('PATH', 1))}"
+export AUTOMAKE = "${@bb.which('automake', d.getVar('PATH', True))}"
FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*"
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.5.bb b/meta/recipes-devtools/cmake/cmake_2.8.5.bb
index 3e2a21838..6145345b9 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=d.getVar("prefix", 1)
- docdir=d.getVar("docdir", 1)
+ prefix=d.getVar("prefix", True)
+ docdir=d.getVar("docdir", True)
if not docdir.startswith(prefix):
raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index df6021ae6..bf6c2398e 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -10,14 +10,14 @@ inherit autotools gettext
FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/gcc-${PV}"
def get_gcc_fpu_setting(bb, d):
- if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
+ if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
return "--with-float=soft"
- if d.getVar('TARGET_FPU', 1) in [ 'ppc-efd' ]:
+ if d.getVar('TARGET_FPU', True) in [ 'ppc-efd' ]:
return "--enable-e500_double"
return ""
def get_gcc_mips_plt_setting(bb, d):
- if d.getVar('TARGET_ARCH', 1) in [ 'mips', 'mipsel' ] and 'mplt' in d.getVar('DISTRO_FEATURES',1).split() :
+ if d.getVar('TARGET_ARCH', True) 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 8ab799f7f..7a96e914b 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', ''][d.getVar('USE_NLS', 1) != 'no']} \
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
--with-gnu-ld \
--enable-shared \
--enable-languages=${LANGUAGES} \
diff --git a/meta/recipes-devtools/guile/guile_2.0.3.bb b/meta/recipes-devtools/guile/guile_2.0.3.bb
index 538ff46c9..c27a8c00b 100644
--- a/meta/recipes-devtools/guile/guile_2.0.3.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.3.bb
@@ -31,7 +31,7 @@ BBCLASSEXTEND = "native"
DEPENDS = "libunistring bdwgc gmp libtool libffi"
# add guile-native only to the target recipe's DEPENDS
-DEPENDS += "${@['guile-native', ''][d.getVar('PN', 1) != 'guile']}"
+DEPENDS += "${@['guile-native', ''][d.getVar('PN', True) != 'guile']}"
EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix', ''][bb.data.inherits_class('native',d)]}"
diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 6703b5cb3..f9a6cc9d5 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -287,7 +287,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 = "${@d.getVar('PACKAGES', 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', True).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/unfs-server/unfs-server_2.1+2.2beta47.bb b/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb
index eb80b54fc..4e619c5f6 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 = d.getVar("PN", 1)
+ pn = d.getVar("PN", True)
if not pn.endswith('-native') and not pn.endswith('-nativesdk'):
raise bb.parse.SkipPackage("unfs-server is intended for native/nativesdk builds only")
}