From 06f2f8ce0a3093973ca54b48f542f8485b666079 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Mar 2012 10:59:25 +0000 Subject: 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 --- meta/classes/gconf.bbclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'meta/classes/gconf.bbclass') diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass index 7bfa871bd2..095d04b1b8 100644 --- a/meta/classes/gconf.bbclass +++ b/meta/classes/gconf.bbclass @@ -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" -- cgit v1.2.3-54-g00ecf