From ab7c1d239b122c8e549e8112c88fd46c9e2b061b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 18 Jun 2015 15:14:16 +0100 Subject: meta: Add explict getVar param for (non) expansion Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie --- meta/conf/bitbake.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'meta/conf/bitbake.conf') diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 2b86442b1d..d42cd55220 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -181,20 +181,20 @@ ASSUME_PROVIDED = "\ # Package default variables. ################################################################## -PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" -PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" -PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}" +PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" +PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" +PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" PF = "${PN}-${EXTENDPE}${PV}-${PR}" -EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}" +EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}" P = "${PN}-${PV}" -EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" +EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}" PRAUTOINX = "${PF}" PKGV ?= "${PV}" PKGR ?= "${PR}${EXTENDPRAUTO}" -PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}" -EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" +PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}" +EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}" EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" # Base package name @@ -311,7 +311,7 @@ FILES_${PN}-locale = "${datadir}/locale" # File manifest -FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}" +FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}" # 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}" # This default was only used for checking -- cgit v1.2.3