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:57:25 +0100 |
commit | 86d30d756a60d181a95cf07041920a367a0cd0ba (patch) | |
tree | 950353e2e1cd1e7b812ff941b4d06076acd2c752 /meta/conf/bitbake.conf | |
parent | f98c8490099a02c42306e1671579631a61c9df73 (diff) | |
download | poky-86d30d756a60d181a95cf07041920a367a0cd0ba.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 *`
(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.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 2b86442b1d..d42cd55220 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -181,20 +181,20 @@ ASSUME_PROVIDED = "\ | |||
181 | # Package default variables. | 181 | # Package default variables. |
182 | ################################################################## | 182 | ################################################################## |
183 | 183 | ||
184 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" | 184 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" |
185 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" | 185 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" |
186 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}" | 186 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" |
187 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" | 187 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" |
188 | EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}" | 188 | EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}" |
189 | P = "${PN}-${PV}" | 189 | P = "${PN}-${PV}" |
190 | 190 | ||
191 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" | 191 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}" |
192 | PRAUTOINX = "${PF}" | 192 | PRAUTOINX = "${PF}" |
193 | 193 | ||
194 | PKGV ?= "${PV}" | 194 | PKGV ?= "${PV}" |
195 | PKGR ?= "${PR}${EXTENDPRAUTO}" | 195 | PKGR ?= "${PR}${EXTENDPRAUTO}" |
196 | PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}" | 196 | PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}" |
197 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" | 197 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}" |
198 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" | 198 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" |
199 | 199 | ||
200 | # Base package name | 200 | # Base package name |
@@ -311,7 +311,7 @@ FILES_${PN}-locale = "${datadir}/locale" | |||
311 | 311 | ||
312 | # File manifest | 312 | # File manifest |
313 | 313 | ||
314 | FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}" | 314 | FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}" |
315 | # FILESPATH is set in base.bbclass | 315 | # FILESPATH is set in base.bbclass |
316 | #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" | 316 | #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" |
317 | # This default was only used for checking | 317 | # This default was only used for checking |