summaryrefslogtreecommitdiff
path: root/meta/conf
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 13:56:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:04:20 +0100
commitb9a1b9ad55c0f9fec082ffa37e576d8fd664becd (patch)
treec0ac68002592f46607b4adc5ab58b0d320fe4b38 /meta/conf
parente501a98e87b8854040ac4081326871d7d6397917 (diff)
downloadopenembedded-core-b9a1b9ad55c0f9fec082ffa37e576d8fd664becd.tar.gz
openembedded-core-b9a1b9ad55c0f9fec082ffa37e576d8fd664becd.tar.bz2
openembedded-core-b9a1b9ad55c0f9fec082ffa37e576d8fd664becd.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/bitbake.conf4
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'}"
PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}"
PRINC ?= "0"
PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-EXTENDPE = "${@['','${PE\x7d_'][d.getVar('PE',1) > 0]}"
+EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}"
P = "${PN}-${PV}"
EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}"
@@ -196,7 +196,7 @@ PRAUTOINX = "${PF}"
PKGV ?= "${PV}"
PKGR ?= "${PR}${EXTENDPRAUTO}"
-PKGE ?= "${@['','${PE\x7d'][d.getVar('PE',1) > 0]}"
+PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}"
EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}"
EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"