summaryrefslogtreecommitdiff
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
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>
-rw-r--r--meta/classes/autotools.bbclass6
-rw-r--r--meta/classes/base.bbclass42
-rw-r--r--meta/classes/copyleft_compliance.bbclass4
-rw-r--r--meta/classes/cpan-base.bbclass2
-rw-r--r--meta/classes/cpan_build.bbclass4
-rw-r--r--meta/classes/debian.bbclass10
-rw-r--r--meta/classes/distrodata.bbclass2
-rw-r--r--meta/classes/distutils-base.bbclass2
-rw-r--r--meta/classes/distutils-native-base.bbclass2
-rw-r--r--meta/classes/gconf.bbclass12
-rw-r--r--meta/classes/gtk-icon-cache.bbclass16
-rw-r--r--meta/classes/image.bbclass8
-rw-r--r--meta/classes/imagetest-qemu.bbclass32
-rw-r--r--meta/classes/kernel-arch.bbclass6
-rw-r--r--meta/classes/kernel.bbclass46
-rw-r--r--meta/classes/libc-common.bbclass6
-rw-r--r--meta/classes/license.bbclass2
-rw-r--r--meta/classes/metadata_scm.bbclass2
-rw-r--r--meta/classes/package.bbclass2
-rw-r--r--meta/classes/package_ipk.bbclass42
-rw-r--r--meta/classes/package_rpm.bbclass2
-rw-r--r--meta/classes/package_tar.bbclass18
-rw-r--r--meta/classes/packagedata.bbclass4
-rw-r--r--meta/classes/pkg_distribute.bbclass2
-rw-r--r--meta/classes/pkg_metainfo.bbclass12
-rw-r--r--meta/classes/populate_sdk_deb.bbclass4
-rw-r--r--meta/classes/qemu.bbclass2
-rw-r--r--meta/classes/qt4e.bbclass2
-rw-r--r--meta/classes/recipe_sanity.bbclass30
-rw-r--r--meta/classes/siteconfig.bbclass2
-rw-r--r--meta/classes/siteinfo.bbclass2
-rw-r--r--meta/classes/sourcepkg.bbclass8
-rw-r--r--meta/classes/src_distribute.bbclass12
-rw-r--r--meta/classes/syslinux.bbclass28
-rw-r--r--meta/classes/task.bbclass2
-rw-r--r--meta/classes/update-alternatives.bbclass14
-rw-r--r--meta/classes/update-rc.d.bbclass20
-rw-r--r--meta/classes/utility-tasks.bbclass2
-rw-r--r--meta/classes/utils.bbclass2
-rw-r--r--meta/conf/bitbake.conf12
-rw-r--r--meta/conf/distro/defaultsetup.conf2
-rw-r--r--meta/conf/machine/include/arm/feature-arm-thumb.inc2
-rw-r--r--meta/conf/machine/include/tune-thumb.inc8
-rw-r--r--meta/lib/oe/patch.py4
-rw-r--r--meta/lib/oe/path.py2
-rw-r--r--meta/recipes-bsp/grub/grub_0.97.bb2
-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
-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
-rw-r--r--meta/recipes-extended/cups/cups14.inc2
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.12.7.bb6
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.16.6.bb6
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.8.bb4
-rw-r--r--meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb4
-rw-r--r--meta/recipes-graphics/cairo/cairo-fpu.inc2
-rw-r--r--meta/recipes-graphics/clutter/clutter-fpu.inc2
-rw-r--r--meta/recipes-graphics/fontconfig/fontconfig-native_2.8.0.bb2
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri.inc2
-rw-r--r--meta/recipes-graphics/pango/pango.inc2
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.2.0.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc6
-rw-r--r--meta/recipes-multimedia/alsa/alsa-fpu.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc4
-rw-r--r--meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb2
-rw-r--r--meta/recipes-qt/qt4/qt4.inc6
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc2
-rw-r--r--meta/recipes-sato/puzzles/oh-puzzles_git.bb2
-rw-r--r--meta/recipes-support/boost/boost.inc4
83 files changed, 290 insertions, 290 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index a8d2b5f32e..66eba9fad0 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -1,8 +1,8 @@
def autotools_dep_prepend(d):
- if d.getVar('INHIBIT_AUTOTOOLS_DEPS', 1):
+ if d.getVar('INHIBIT_AUTOTOOLS_DEPS', True):
return ''
- pn = d.getVar('PN', 1)
+ pn = d.getVar('PN', True)
deps = ''
if pn in ['autoconf-native', 'automake-native', 'help2man-native']:
@@ -13,7 +13,7 @@ def autotools_dep_prepend(d):
deps += 'libtool-native '
if not bb.data.inherits_class('native', d) \
and not bb.data.inherits_class('cross', d) \
- and not d.getVar('INHIBIT_DEFAULT_DEPS', 1):
+ and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
deps += 'libtool-cross '
return deps + 'gnu-config-native '
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index cab56deb39..48e4a28d83 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -60,8 +60,8 @@ def base_dep_prepend(d):
# we need that built is the responsibility of the patch function / class, not
# the application.
if not d.getVar('INHIBIT_DEFAULT_DEPS'):
- if (d.getVar('HOST_SYS', 1) !=
- d.getVar('BUILD_SYS', 1)):
+ if (d.getVar('HOST_SYS', True) !=
+ d.getVar('BUILD_SYS', True)):
deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
return deps
@@ -203,7 +203,7 @@ def preferred_ml_updates(d):
def get_layers_branch_rev(d):
- layers = (d.getVar("BBLAYERS", 1) or "").split()
+ layers = (d.getVar("BBLAYERS", True) or "").split()
layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None)) \
@@ -233,7 +233,7 @@ python base_eventhandler() {
if name.startswith("BuildStarted"):
e.data.setVar( 'BB_VERSION', bb.__version__)
statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU']
- statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, 1) or '') for i in statusvars]
+ statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, True) or '') for i in statusvars]
statuslines += get_layers_branch_rev(e.data)
statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
@@ -242,7 +242,7 @@ python base_eventhandler() {
needed_vars = [ "TARGET_ARCH", "TARGET_OS" ]
pesteruser = []
for v in needed_vars:
- val = e.data.getVar(v, 1)
+ val = e.data.getVar(v, True)
if not val or val == 'INVALID':
pesteruser.append(v)
if pesteruser:
@@ -344,7 +344,7 @@ python () {
pr = pr_prefix.group(0) + str(nval) + pr[prval.end():]
d.setVar('PR', pr)
- pn = d.getVar('PN', 1)
+ pn = d.getVar('PN', True)
license = d.getVar('LICENSE', True)
if license == "INVALID":
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
@@ -370,36 +370,36 @@ python () {
d.setVarFlag('do_package_setscene', 'fakeroot', 1)
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0)
if not source_mirror_fetch:
- need_host = d.getVar('COMPATIBLE_HOST', 1)
+ need_host = d.getVar('COMPATIBLE_HOST', True)
if need_host:
import re
- this_host = d.getVar('HOST_SYS', 1)
+ this_host = d.getVar('HOST_SYS', True)
if not re.match(need_host, this_host):
raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
- need_machine = d.getVar('COMPATIBLE_MACHINE', 1)
+ need_machine = d.getVar('COMPATIBLE_MACHINE', True)
if need_machine:
import re
- this_machine = d.getVar('MACHINE', 1)
+ this_machine = d.getVar('MACHINE', True)
if this_machine and not re.match(need_machine, this_machine):
- this_soc_family = d.getVar('SOC_FAMILY', 1)
+ this_soc_family = d.getVar('SOC_FAMILY', True)
if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine)
- dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', 1)
+ dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True)
if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"):
- hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, 1) or "").split()
- lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, 1) or "").split()
- dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split()
+ hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or "").split()
+ lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or "").split()
+ dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or "").split()
if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist:
- this_license = d.getVar('LICENSE', 1)
+ this_license = d.getVar('LICENSE', True)
if incompatible_license(d,dont_want_license):
bb.note("SKIPPING %s because it's %s" % (pn, this_license))
raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
- srcuri = d.getVar('SRC_URI', 1)
+ srcuri = d.getVar('SRC_URI', True)
# Svn packages should DEPEND on subversion-native
if "svn://" in srcuri:
d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot')
@@ -426,8 +426,8 @@ python () {
d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
# 'multimachine' handling
- mach_arch = d.getVar('MACHINE_ARCH', 1)
- pkg_arch = d.getVar('PACKAGE_ARCH', 1)
+ mach_arch = d.getVar('MACHINE_ARCH', True)
+ pkg_arch = d.getVar('PACKAGE_ARCH', True)
if (pkg_arch == mach_arch):
# Already machine specific - nothing further to do
@@ -458,9 +458,9 @@ python () {
d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
return
- packages = d.getVar('PACKAGES', 1).split()
+ packages = d.getVar('PACKAGES', True).split()
for pkg in packages:
- pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, 1)
+ pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, True)
# We could look for != PACKAGE_ARCH here but how to choose
# if multiple differences are present?
diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass
index 2eb9dedd24..4082e7e15d 100644
--- a/meta/classes/copyleft_compliance.bbclass
+++ b/meta/classes/copyleft_compliance.bbclass
@@ -69,8 +69,8 @@ python do_prepare_copyleft_sources () {
else:
bb.debug(1, 'copyleft: %s is included' % p)
- sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', 1)
- src_uri = d.getVar('SRC_URI', 1).split()
+ sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
+ src_uri = d.getVar('SRC_URI', True).split()
fetch = bb.fetch2.Fetch(src_uri, d)
ud = fetch.ud
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index 79582ca76c..6cb1fefc29 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -28,7 +28,7 @@ def get_perl_version(d):
# Determine where the library directories are
def perl_get_libdirs(d):
- libdir = d.getVar('libdir', 1)
+ libdir = d.getVar('libdir', True)
if is_target(d) == "no":
libdir += '/perl-native'
libdir += '/perl'
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 981332c4fa..36ffc56b85 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -10,9 +10,9 @@ inherit cpan-base
# libmodule-build-perl)
#
def cpan_build_dep_prepend(d):
- if d.getVar('CPAN_BUILD_DEPS', 1):
+ if d.getVar('CPAN_BUILD_DEPS', True):
return ''
- pn = d.getVar('PN', 1)
+ pn = d.getVar('PN', True)
if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
return ''
return 'libmodule-build-perl-native '
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 025abcfad0..3637e2ebe7 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -22,8 +22,8 @@ python () {
python debian_package_name_hook () {
import glob, copy, stat, errno, re
- pkgdest = d.getVar('PKGDEST', 1)
- packages = d.getVar('PACKAGES', 1)
+ pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar('PACKAGES', True)
bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
so_re = re.compile("lib.*\.so")
@@ -60,7 +60,7 @@ python debian_package_name_hook () {
for f in files:
if so_re.match(f):
fp = os.path.join(root, f)
- cmd = (d.getVar('BUILD_PREFIX', 1) or "") + "objdump -p " + fp + " 2>/dev/null"
+ cmd = (d.getVar('BUILD_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null"
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
@@ -74,7 +74,7 @@ python debian_package_name_hook () {
if len(sonames) == 1:
soname = sonames[0]
elif len(sonames) > 1:
- lead = d.getVar('LEAD_SONAME', 1)
+ lead = d.getVar('LEAD_SONAME', True)
if lead:
r = re.compile(lead)
filtered = []
@@ -117,7 +117,7 @@ python debian_package_name_hook () {
# and later
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
# so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5
- for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', 1) or "").split(), reverse=True):
+ for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True):
auto_libname(packages, pkg)
}
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index ff5b836871..aba4bd7fa6 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -372,7 +372,7 @@ python do_checkpkg() {
f.close()
if status != "ErrHostNoDir" and re.match("Err", status):
- logpath = d.getVar('LOG_DIR', 1)
+ logpath = d.getVar('LOG_DIR', True)
os.system("cp %s %s/" % (f.name, logpath))
os.unlink(f.name)
return status
diff --git a/meta/classes/distutils-base.bbclass b/meta/classes/distutils-base.bbclass
index e7d0bb8071..6d18e08f14 100644
--- a/meta/classes/distutils-base.bbclass
+++ b/meta/classes/distutils-base.bbclass
@@ -1,4 +1,4 @@
-DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', 1) == '')]}"
+DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', True) == '')]}"
RDEPENDS_${PN} += "${@['', 'python-core']['${PN}' == '${BPN}']}"
inherit distutils-common-base
diff --git a/meta/classes/distutils-native-base.bbclass b/meta/classes/distutils-native-base.bbclass
index 47367d796b..ceda512e39 100644
--- a/meta/classes/distutils-native-base.bbclass
+++ b/meta/classes/distutils-native-base.bbclass
@@ -1,3 +1,3 @@
-DEPENDS += "${@["python-native", ""][(d.getVar('PACKAGES', 1) == '')]}"
+DEPENDS += "${@["python-native", ""][(d.getVar('PACKAGES', True) == '')]}"
inherit distutils-common-base
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 7bfa871bd2..095d04b1b8 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -32,8 +32,8 @@ done
python populate_packages_append () {
import re
- packages = d.getVar('PACKAGES', 1).split()
- pkgdest = d.getVar('PKGDEST', 1)
+ packages = d.getVar('PACKAGES', True).split()
+ pkgdest = d.getVar('PKGDEST', True)
for pkg in packages:
schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
@@ -46,15 +46,15 @@ python populate_packages_append () {
if schemas != []:
bb.note("adding gconf postinst and prerm scripts to %s" % pkg)
d.setVar('SCHEMA_FILES', " ".join(schemas))
- postinst = d.getVar('pkg_postinst_%s' % pkg, 1) or d.getVar('pkg_postinst', 1)
+ postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
if not postinst:
postinst = '#!/bin/sh\n'