diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 10:59:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-05 10:33:18 -0800 |
commit | 41bc192c0b5795561b239872008c91a867732219 (patch) | |
tree | a21feb51bde721ba553296676ce4b5ea2662bf37 /meta/classes/debian.bbclass | |
parent | 3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff) | |
download | openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.bz2 openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.xz openembedded-core-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/debian.bbclass')
-rw-r--r-- | meta/classes/debian.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 025abcfad..3637e2ebe 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass @@ -22,8 +22,8 @@ python () { python debian_package_name_hook () { import glob, copy, stat, errno, re - pkgdest = d.getVar('PKGDEST', 1) - packages = d.getVar('PACKAGES', 1) + pkgdest = d.getVar('PKGDEST', True) + packages = d.getVar('PACKAGES', True) bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$") lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$") so_re = re.compile("lib.*\.so") @@ -60,7 +60,7 @@ python debian_package_name_hook () { for f in files: if so_re.match(f): fp = os.path.join(root, f) - cmd = (d.getVar('BUILD_PREFIX', 1) or "") + "objdump -p " + fp + " 2>/dev/null" + cmd = (d.getVar('BUILD_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null" fd = os.popen(cmd) lines = fd.readlines() fd.close() @@ -74,7 +74,7 @@ python debian_package_name_hook () { if len(sonames) == 1: soname = sonames[0] elif len(sonames) > 1: - lead = d.getVar('LEAD_SONAME', 1) + lead = d.getVar('LEAD_SONAME', True) if lead: r = re.compile(lead) filtered = [] @@ -117,7 +117,7 @@ python debian_package_name_hook () { # and later # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 - for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', 1) or "").split(), reverse=True): + for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True): auto_libname(packages, pkg) } |