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:
Richard Purdie
2012-03-03 10:59:25 +00:00
parent d01dadfb87
commit 06f2f8ce0a
83 changed files with 290 additions and 290 deletions

View File

@@ -20,7 +20,7 @@ python do_install_config () {
data = bb.data.expand(data, d)
outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt')
outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
outpath = os.path.join(outdir, 'apt.conf.sample')

View File

@@ -59,15 +59,15 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
${localstatedir} ${sysconfdir} \
${libdir}/dpkg"
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', 1))} \
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \
${docdir}/apt"
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}"
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', 1))}
${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}
${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', True))}
${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}
install -d ${D}${bindir}
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/