summaryrefslogtreecommitdiff
path: root/meta/recipes-core
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-core
parent3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff)
downloadopenembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz
openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.bz2
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-core')
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc4
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.13.bb4
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.15.bb4
-rw-r--r--meta/recipes-core/libxml/libxml2.inc2
-rw-r--r--meta/recipes-core/tasks/task-base.bb4
-rw-r--r--meta/recipes-core/tasks/task-core-sdk.bb2
-rw-r--r--meta/recipes-core/uclibc/uclibc-config.inc12
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc6
8 files changed, 19 insertions, 19 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index d89871718e..9e45fc1fd5 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -8,10 +8,10 @@
python __anonymous () {
import bb, re
- uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', 1)) != None)
+ uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
if uc_os:
raise bb.parse.SkipPackage("incompatible with target %s" %
- d.getVar('TARGET_OS', 1))
+ d.getVar('TARGET_OS', True))
}
# Set this to zero if you don't want ldconfig in the output package
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index 8555985335..e718a1f93e 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -52,10 +52,10 @@ FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIR
python __anonymous () {
import bb, re
- uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', 1)) != None)
+ uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None)
if uc_os:
raise bb.parse.SkipPackage("incompatible with target %s" %
- d.getVar('TARGET_OS', 1))
+ d.getVar('TARGET_OS', True))
}
export libc_cv_slibdir = "${base_libdir}"
diff --git a/meta/recipes-core/eglibc/eglibc_2.15.bb b/meta/recipes-core/eglibc/eglibc_2.15.bb
index 6d66342d59..b4c1ea5a99 100644
--- a/meta/recipes-core/eglibc/eglibc_2.15.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.15.bb
@@ -55,10 +55,10 @@ FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIR
python __anonymous () {
import bb, re
- uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', 1)) != None)
+ uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None)
if uc_os:
raise bb.parse.SkipPackage("incompatible with target %s" %
- d.getVar('TARGET_OS', 1))
+ d.getVar('TARGET_OS', True))
}
export libc_cv_slibdir = "${base_libdir}"
diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc
index 0979acd05d..2eecbd30e7 100644
--- a/meta/recipes-core/libxml/libxml2.inc
+++ b/meta/recipes-core/libxml/libxml2.inc
@@ -33,7 +33,7 @@ export LDFLAGS += "-ldl"
python populate_packages_prepend () {
# autonamer would call this libxml2-2, but we don't want that
- if d.getVar('DEBIAN_NAMES', 1):
+ if d.getVar('DEBIAN_NAMES', True):
d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
}
diff --git a/meta/recipes-core/tasks/task-base.bb b/meta/recipes-core/tasks/task-base.bb
index 2032432844..ddae7aebee 100644
--- a/meta/recipes-core/tasks/task-base.bb
+++ b/meta/recipes-core/tasks/task-base.bb
@@ -126,8 +126,8 @@ python __anonymous () {
import bb
- distro_features = set(d.getVar("DISTRO_FEATURES", 1).split())
- machine_features= set(d.getVar("MACHINE_FEATURES", 1).split())
+ distro_features = set(d.getVar("DISTRO_FEATURES", True).split())
+ machine_features= set(d.getVar("MACHINE_FEATURES", True).split())
if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
d.setVar("ADD_BT", "task-base-bluetooth")
diff --git a/meta/recipes-core/tasks/task-core-sdk.bb b/meta/recipes-core/tasks/task-core-sdk.bb
index d940e39318..ec6cdccdb5 100644
--- a/meta/recipes-core/tasks/task-core-sdk.bb
+++ b/meta/recipes-core/tasks/task-core-sdk.bb
@@ -50,7 +50,7 @@ RDEPENDS_task-core-sdk = "\
#python generate_sdk_pkgs () {
# poky_pkgs = read_pkgdata('task-core', d)['PACKAGES']
-# pkgs = d.getVar('PACKAGES', 1).split()
+# pkgs = d.getVar('PACKAGES', True).split()
# for pkg in poky_pkgs.split():
# newpkg = pkg.replace('task-core', 'task-core-sdk')
#
diff --git a/meta/recipes-core/uclibc/uclibc-config.inc b/meta/recipes-core/uclibc/uclibc-config.inc
index 8bb094800d..0e0c1885ac 100644
--- a/meta/recipes-core/uclibc/uclibc-config.inc
+++ b/meta/recipes-core/uclibc/uclibc-config.inc
@@ -35,7 +35,7 @@ def map_uclibc_arch(a, d):
"""Return the uClibc architecture for the given TARGET_ARCH."""
import re
- valid_archs = d.getVar('valid_archs', 1).split()
+ valid_archs = d.getVar('valid_archs', True).split()
if re.match('^(arm|sa110).*', a): return 'arm'
elif re.match('^(i.86|athlon)$', a): return 'i386'
@@ -50,14 +50,14 @@ def map_uclibc_arch(a, d):
else:
bb.error("cannot map '%s' to a uClibc architecture" % a)
-export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d)}"
+export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}"
def map_uclibc_abi(o, d):
"""Return the uClibc ABI for the given TARGET_OS."""
import re
- arch = d.getVar('TARGET_ARCH', 1)
- if map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d) == "arm":
+ arch = d.getVar('TARGET_ARCH', True)
+ if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm":
if re.match('.*eabi$', o): return 'ARM_EABI'
else: return 'ARM_OABI'
# FIXME: This is inaccurate! Handle o32, n32, n64
@@ -65,7 +65,7 @@ def map_uclibc_abi(o, d):
elif re.match('^mips.*', arch): return 'MIPS_O32_ABI'
return ""
-export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', 1), d)}"
+export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}"
def map_uclibc_endian(a, d):
"""Return the uClibc endianess for the given TARGET_ARCH."""
@@ -79,7 +79,7 @@ def map_uclibc_endian(a, d):
return 'BIG'
return 'LITTLE'
-export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', 1), d)}"
+export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}"
# internal helper
def uclibc_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index 5e9e2e9f37..69d8921e3e 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -124,9 +124,9 @@ configmangle = '/^KERNEL_HEADERS/d; \
/^SHARED_LIB_LOADER_PREFIX/d; \
/^UCLIBC_EXTRA_CFLAGS/d; \
s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
- ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", 1) != "arm"]} \
- ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", 1) == "yes"]} \
- ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
+ ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) != "arm"]} \
+ ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \
+ ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
/^CROSS/d; \
/^TARGET_ARCH=/d; \
/^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \