mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03: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:
@@ -32,8 +32,8 @@ done
|
||||
|
||||
python populate_packages_append () {
|
||||
import re
|
||||
packages = d.getVar('PACKAGES', 1).split()
|
||||
pkgdest = d.getVar('PKGDEST', 1)
|
||||
packages = d.getVar('PACKAGES', True).split()
|
||||
pkgdest = d.getVar('PKGDEST', True)
|
||||
|
||||
for pkg in packages:
|
||||
schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
|
||||
@@ -46,15 +46,15 @@ python populate_packages_append () {
|
||||
if schemas != []:
|
||||
bb.note("adding gconf postinst and prerm scripts to %s" % pkg)
|
||||
d.setVar('SCHEMA_FILES', " ".join(schemas))
|
||||
postinst = d.getVar('pkg_postinst_%s' % pkg, 1) or d.getVar('pkg_postinst', 1)
|
||||
postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
|
||||
if not postinst:
|
||||
postinst = '#!/bin/sh\n'
|
||||
postinst += d.getVar('gconf_postinst', 1)
|
||||
postinst += d.getVar('gconf_postinst', True)
|
||||
d.setVar('pkg_postinst_%s' % pkg, postinst)
|
||||
prerm = d.getVar('pkg_prerm_%s' % pkg, 1) or d.getVar('pkg_prerm', 1)
|
||||
prerm = d.getVar('pkg_prerm_%s' % pkg, True) or d.getVar('pkg_prerm', True)
|
||||
if not prerm:
|
||||
prerm = '#!/bin/sh\n'
|
||||
prerm += d.getVar('gconf_prerm', 1)
|
||||
prerm += d.getVar('gconf_prerm', True)
|
||||
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " gconf"
|
||||
|
||||
Reference in New Issue
Block a user