mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -13,8 +13,8 @@ SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aac
|
||||
|
||||
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
|
||||
python () {
|
||||
prefix=d.getVar("prefix", 1)
|
||||
docdir=d.getVar("docdir", 1)
|
||||
prefix=d.getVar("prefix", True)
|
||||
docdir=d.getVar("docdir", True)
|
||||
|
||||
if not docdir.startswith(prefix):
|
||||
raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
|
||||
|
||||
Reference in New Issue
Block a user