diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 10:59:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-05 10:22:56 -0800 |
commit | 06f2f8ce0a3093973ca54b48f542f8485b666079 (patch) | |
tree | dbcfa5c491eb2e5d237aa539cb7c6e77dc07dd6f /meta/recipes-core | |
parent | d01dadfb87cfd2284b3e849d35a35fe5df0239c4 (diff) | |
download | poky-06f2f8ce0a3093973ca54b48f542f8485b666079.tar.gz |
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.inc | 4 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc_2.13.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/eglibc/eglibc_2.15.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/libxml/libxml2.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/tasks/task-base.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/tasks/task-core-sdk.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-config.inc | 12 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/uclibc.inc | 6 |
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 @@ | |||
8 | 8 | ||
9 | python __anonymous () { | 9 | python __anonymous () { |
10 | import bb, re | 10 | import bb, re |
11 | uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', 1)) != None) | 11 | uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None) |
12 | if uc_os: | 12 | if uc_os: |
13 | raise bb.parse.SkipPackage("incompatible with target %s" % | 13 | raise bb.parse.SkipPackage("incompatible with target %s" % |
14 | d.getVar('TARGET_OS', 1)) | 14 | d.getVar('TARGET_OS', True)) |
15 | } | 15 | } |
16 | 16 | ||
17 | # Set this to zero if you don't want ldconfig in the output package | 17 | # 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 | |||
52 | 52 | ||
53 | python __anonymous () { | 53 | python __anonymous () { |
54 | import bb, re | 54 | import bb, re |
55 | uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', 1)) != None) | 55 | uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) |
56 | if uc_os: | 56 | if uc_os: |
57 | raise bb.parse.SkipPackage("incompatible with target %s" % | 57 | raise bb.parse.SkipPackage("incompatible with target %s" % |
58 | d.getVar('TARGET_OS', 1)) | 58 | d.getVar('TARGET_OS', True)) |
59 | } | 59 | } |
60 | 60 | ||
61 | export libc_cv_slibdir = "${base_libdir}" | 61 | 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 | |||
55 | 55 | ||
56 | python __anonymous () { | 56 | python __anonymous () { |
57 | import bb, re | 57 | import bb, re |
58 | uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', 1)) != None) | 58 | uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) |
59 | if uc_os: | 59 | if uc_os: |
60 | raise bb.parse.SkipPackage("incompatible with target %s" % | 60 | raise bb.parse.SkipPackage("incompatible with target %s" % |
61 | d.getVar('TARGET_OS', 1)) | 61 | d.getVar('TARGET_OS', True)) |
62 | } | 62 | } |
63 | 63 | ||
64 | export libc_cv_slibdir = "${base_libdir}" | 64 | 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" | |||
33 | 33 | ||
34 | python populate_packages_prepend () { | 34 | python populate_packages_prepend () { |
35 | # autonamer would call this libxml2-2, but we don't want that | 35 | # autonamer would call this libxml2-2, but we don't want that |
36 | if d.getVar('DEBIAN_NAMES', 1): | 36 | if d.getVar('DEBIAN_NAMES', True): |
37 | d.setVar('PKG_libxml2', '${MLPREFIX}libxml2') | 37 | d.setVar('PKG_libxml2', '${MLPREFIX}libxml2') |
38 | } | 38 | } |
39 | 39 | ||
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 () { | |||
126 | 126 | ||
127 | import bb | 127 | import bb |
128 | 128 | ||
129 | distro_features = set(d.getVar("DISTRO_FEATURES", 1).split()) | 129 | distro_features = set(d.getVar("DISTRO_FEATURES", True).split()) |
130 | machine_features= set(d.getVar("MACHINE_FEATURES", 1).split()) | 130 | machine_features= set(d.getVar("MACHINE_FEATURES", True).split()) |
131 | 131 | ||
132 | 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): | 132 | 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): |
133 | d.setVar("ADD_BT", "task-base-bluetooth") | 133 | 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 = "\ | |||
50 | 50 | ||
51 | #python generate_sdk_pkgs () { | 51 | #python generate_sdk_pkgs () { |
52 | # poky_pkgs = read_pkgdata('task-core', d)['PACKAGES'] | 52 | # poky_pkgs = read_pkgdata('task-core', d)['PACKAGES'] |
53 | # pkgs = d.getVar('PACKAGES', 1).split() | 53 | # pkgs = d.getVar('PACKAGES', True).split() |
54 | # for pkg in poky_pkgs.split(): | 54 | # for pkg in poky_pkgs.split(): |
55 | # newpkg = pkg.replace('task-core', 'task-core-sdk') | 55 | # newpkg = pkg.replace('task-core', 'task-core-sdk') |
56 | # | 56 | # |
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): | |||
35 | """Return the uClibc architecture for the given TARGET_ARCH.""" | 35 | """Return the uClibc architecture for the given TARGET_ARCH.""" |
36 | import re | 36 | import re |
37 | 37 | ||
38 | valid_archs = d.getVar('valid_archs', 1).split() | 38 | valid_archs = d.getVar('valid_archs', True).split() |
39 | 39 | ||
40 | if re.match('^(arm|sa110).*', a): return 'arm' | 40 | if re.match('^(arm|sa110).*', a): return 'arm' |
41 | elif re.match('^(i.86|athlon)$', a): return 'i386' | 41 | elif re.match('^(i.86|athlon)$', a): return 'i386' |
@@ -50,14 +50,14 @@ def map_uclibc_arch(a, d): | |||
50 | else: | 50 | else: |
51 | bb.error("cannot map '%s' to a uClibc architecture" % a) | 51 | bb.error("cannot map '%s' to a uClibc architecture" % a) |
52 | 52 | ||
53 | export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d)}" | 53 | export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}" |
54 | 54 | ||
55 | def map_uclibc_abi(o, d): | 55 | def map_uclibc_abi(o, d): |
56 | """Return the uClibc ABI for the given TARGET_OS.""" | 56 | """Return the uClibc ABI for the given TARGET_OS.""" |
57 | import re | 57 | import re |
58 | 58 | ||
59 | arch = d.getVar('TARGET_ARCH', 1) | 59 | arch = d.getVar('TARGET_ARCH', True) |
60 | if map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d) == "arm": | 60 | if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm": |
61 | if re.match('.*eabi$', o): return 'ARM_EABI' | 61 | if re.match('.*eabi$', o): return 'ARM_EABI' |
62 | else: return 'ARM_OABI' | 62 | else: return 'ARM_OABI' |
63 | # FIXME: This is inaccurate! Handle o32, n32, n64 | 63 | # FIXME: This is inaccurate! Handle o32, n32, n64 |
@@ -65,7 +65,7 @@ def map_uclibc_abi(o, d): | |||
65 | elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' | 65 | elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' |
66 | return "" | 66 | return "" |
67 | 67 | ||
68 | export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', 1), d)}" | 68 | export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}" |
69 | 69 | ||
70 | def map_uclibc_endian(a, d): | 70 | def map_uclibc_endian(a, d): |
71 | """Return the uClibc endianess for the given TARGET_ARCH.""" | 71 | """Return the uClibc endianess for the given TARGET_ARCH.""" |
@@ -79,7 +79,7 @@ def map_uclibc_endian(a, d): | |||
79 | return 'BIG' | 79 | return 'BIG' |
80 | return 'LITTLE' | 80 | return 'LITTLE' |
81 | 81 | ||
82 | export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', 1), d)}" | 82 | export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}" |
83 | 83 | ||
84 | # internal helper | 84 | # internal helper |
85 | def uclibc_cfg(feature, features, tokens, cnf, rem): | 85 | 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; \ | |||
124 | /^SHARED_LIB_LOADER_PREFIX/d; \ | 124 | /^SHARED_LIB_LOADER_PREFIX/d; \ |
125 | /^UCLIBC_EXTRA_CFLAGS/d; \ | 125 | /^UCLIBC_EXTRA_CFLAGS/d; \ |
126 | s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ | 126 | s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ |
127 | ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", 1) != "arm"]} \ | 127 | ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) != "arm"]} \ |
128 | ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", 1) == "yes"]} \ | 128 | ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \ |
129 | ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \ | 129 | ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \ |
130 | /^CROSS/d; \ | 130 | /^CROSS/d; \ |
131 | /^TARGET_ARCH=/d; \ | 131 | /^TARGET_ARCH=/d; \ |
132 | /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \ | 132 | /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \ |