diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-07 13:56:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:06:51 +0100 |
commit | f81de1dbf624f1ccdc901f8c4f4f4a8201b21ff1 (patch) | |
tree | 3a4d3254bc0c8abc55387d5ffa1c7c57b6d27419 /meta/conf/bitbake.conf | |
parent | 8aa498d8955aecb40805eb43da16930934cce5ac (diff) | |
download | poky-f81de1dbf624f1ccdc901f8c4f4f4a8201b21ff1.tar.gz |
bitbake.conf: Use casting to ensure valid comparision
python3 is stricter about type comparisions so add an explicit cast to int()
to ensure this code is portable.
(From OE-Core rev: b9a1b9ad55c0f9fec082ffa37e576d8fd664becd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r-- | meta/conf/bitbake.conf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index d5e923b713..8d4ccce243 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -188,7 +188,7 @@ PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" | |||
188 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}" | 188 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}" |
189 | PRINC ?= "0" | 189 | PRINC ?= "0" |
190 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" | 190 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" |
191 | EXTENDPE = "${@['','${PE\x7d_'][d.getVar('PE',1) > 0]}" | 191 | EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}" |
192 | P = "${PN}-${PV}" | 192 | P = "${PN}-${PV}" |
193 | 193 | ||
194 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" | 194 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" |
@@ -196,7 +196,7 @@ PRAUTOINX = "${PF}" | |||
196 | 196 | ||
197 | PKGV ?= "${PV}" | 197 | PKGV ?= "${PV}" |
198 | PKGR ?= "${PR}${EXTENDPRAUTO}" | 198 | PKGR ?= "${PR}${EXTENDPRAUTO}" |
199 | PKGE ?= "${@['','${PE\x7d'][d.getVar('PE',1) > 0]}" | 199 | PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}" |
200 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" | 200 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" |
201 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" | 201 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" |
202 | 202 | ||