From 06f2f8ce0a3093973ca54b48f542f8485b666079 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Mar 2012 10:59:25 +0000 Subject: 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 --- meta/conf/bitbake.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'meta/conf/bitbake.conf') diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 18879c82fe..c8d9a31074 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -102,7 +102,7 @@ ABIEXTENSION ??= "" TARGET_ARCH = "${TUNE_ARCH}" TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}" TARGET_VENDOR = "-oe" -TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', 1), ''][d.getVar('TARGET_OS', 1) == ('' or 'custom')]}" +TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', True), ''][d.getVar('TARGET_OS', True) == ('' or 'custom')]}" TARGET_PREFIX = "${TARGET_SYS}-" TARGET_CC_ARCH = "${TUNE_CCARGS}" TARGET_LD_ARCH = "${TUNE_LDARGS}" @@ -111,7 +111,7 @@ TARGET_AS_ARCH = "${TUNE_ASARGS}" SDK_ARCH = "${BUILD_ARCH}" SDK_OS = "${BUILD_OS}" SDK_VENDOR = "-oesdk" -SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', 1), ''][d.getVar('SDK_OS', 1) == ('' or 'custom')]}" +SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}" SDK_PREFIX = "${SDK_SYS}-" SDK_CC_ARCH = "${BUILD_CC_ARCH}" SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" @@ -119,7 +119,7 @@ SDK_LD_ARCH = "${BUILD_LD_ARCH}" SDK_AS_ARCH = "${BUILD_AS_ARCH}" PACKAGE_ARCH = "${TUNE_PKGARCH}" -MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', 1), d.getVar('MACHINE', 1)][bool(d.getVar('MACHINE', 1))].replace('-', '_')}" +MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}" PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}" PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" # MACHINE_ARCH shouldn't be included here as a variable dependency @@ -300,14 +300,14 @@ FILES_${PN}-locale = "${datadir}/locale" FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}" # FILESPATH is set in base.bbclass #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" -FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}" +FILESDIR = "${@bb.which(d.getVar('FILESPATH', True), '.')}" ################################################################## # General work and output directories for the build system. ################################################################## TMPDIR ?= "${TOPDIR}/tmp" -CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE', 1))][bool(d.getVar('MACHINE', 1))]}${@['', '/' + str(d.getVar('SDKMACHINE', 1))][bool(d.getVar('SDKMACHINE', 1))]}" +CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE', True))][bool(d.getVar('MACHINE', True))]}${@['', '/' + str(d.getVar('SDKMACHINE', True))][bool(d.getVar('SDKMACHINE', True))]}" # The persistent cache should be shared by all builds PERSISTENT_DIR = "${TMPDIR}/cache" LOG_DIR = "${TMPDIR}/log" @@ -408,7 +408,7 @@ export PATH # Build utility info. ################################################################## -CCACHE = "${@bb.which(d.getVar('PATH', 1), 'ccache') and 'ccache '}" +CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}" TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" -- cgit v1.2.3-54-g00ecf