diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-18 15:14:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:56:17 +0100 |
commit | ab7c1d239b122c8e549e8112c88fd46c9e2b061b (patch) | |
tree | 04a9bf8936f064c0e09dd50dbb3564d525468812 /meta/conf | |
parent | 9a685d60b0549626cccea5fea8f22a57c2306f81 (diff) | |
download | openembedded-core-contrib-ab7c1d239b122c8e549e8112c88fd46c9e2b061b.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r-- | meta/conf/bitbake.conf | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 2b86442b1d9..d42cd552209 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 |