summaryrefslogtreecommitdiffstats
path: root/meta/classes/sourcepkg.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/sourcepkg.bbclass
parent3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff)
downloadopenembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz
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/sourcepkg.bbclass')
-rw-r--r--meta/classes/sourcepkg.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/sourcepkg.bbclass b/meta/classes/sourcepkg.bbclass
index 38edfe4e2e..2a78a90452 100644
--- a/meta/classes/sourcepkg.bbclass
+++ b/meta/classes/sourcepkg.bbclass
@@ -6,7 +6,7 @@ DISTRO ?= "openembedded"
def get_src_tree(d):
- workdir = d.getVar('WORKDIR', 1)
+ workdir = d.getVar('WORKDIR', True)
if not workdir:
bb.error("WORKDIR not defined, unable to find source tree.")
return
@@ -55,8 +55,8 @@ sourcepkg_do_archive_bb() {
python sourcepkg_do_dumpdata() {
- workdir = d.getVar('WORKDIR', 1)
- distro = d.getVar('DISTRO', 1)
+ workdir = d.getVar('WORKDIR', True)
+ distro = d.getVar('DISTRO', True)
s_tree = get_src_tree(d)
openembeddeddir = os.path.join(workdir, s_tree, distro)
dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d))
@@ -74,7 +74,7 @@ python sourcepkg_do_dumpdata() {
# emit the metadata which isnt valid shell
for e in d.keys():
if d.getVarFlag(e, 'python'):
- f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1)))
+ f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, True)))
f.close()
}