summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-03 10:59:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-05 10:33:18 -0800
commit41bc192c0b5795561b239872008c91a867732219 (patch)
treea21feb51bde721ba553296676ce4b5ea2662bf37 /meta/classes/update-rc.d.bbclass
parent3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff)
downloadopenembedded-core-contrib-41bc192c0b5795561b239872008c91a867732219.tar.gz
openembedded-core-contrib-41bc192c0b5795561b239872008c91a867732219.tar.bz2
openembedded-core-contrib-41bc192c0b5795561b239872008c91a867732219.zip
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>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r--meta/classes/update-rc.d.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index db88a8e764..bddead4a25 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -47,7 +47,7 @@ python populate_packages_prepend () {
def update_rcd_package(pkg):
bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg)
localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", 1)
+ overrides = localdata.getVar("OVERRIDES", True)
localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
bb.data.update_data(localdata)
@@ -56,28 +56,28 @@ python populate_packages_prepend () {
execute on the target. Not doing so may cause update_rc.d postinst invoked
twice to cause unwanted warnings.
"""
- postinst = localdata.getVar('pkg_postinst', 1)
+ postinst = localdata.getVar('pkg_postinst', True)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += localdata.getVar('updatercd_postinst', 1)
+ postinst += localdata.getVar('updatercd_postinst', True)
d.setVar('pkg_postinst_%s' % pkg, postinst)
- prerm = localdata.getVar('pkg_prerm', 1)
+ prerm = localdata.getVar('pkg_prerm', True)
if not prerm:
prerm = '#!/bin/sh\n'
- prerm += localdata.getVar('updatercd_prerm', 1)
+ prerm += localdata.getVar('updatercd_prerm', True)
d.setVar('pkg_prerm_%s' % pkg, prerm)
- postrm = localdata.getVar('pkg_postrm', 1)
+ postrm = localdata.getVar('pkg_postrm', True)
if not postrm:
postrm = '#!/bin/sh\n'
- postrm += localdata.getVar('updatercd_postrm', 1)
+ postrm += localdata.getVar('updatercd_postrm', True)
d.setVar('pkg_postrm_%s' % pkg, postrm)
- pkgs = d.getVar('INITSCRIPT_PACKAGES', 1)
+ pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
- pkgs = d.getVar('UPDATERCPN', 1)
- packages = (d.getVar('PACKAGES', 1) or "").split()
+ pkgs = d.getVar('UPDATERCPN', True)
+ packages = (d.getVar('PACKAGES', True) or "").split()
if not pkgs in packages and packages != []:
pkgs = packages[0]
for pkg in pkgs.split():