mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
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>
This commit is contained in:
@@ -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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user