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/src_distribute.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/src_distribute.bbclass')
-rw-r--r-- | meta/classes/src_distribute.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/src_distribute.bbclass b/meta/classes/src_distribute.bbclass index 651e49259..efa2720e2 100644 --- a/meta/classes/src_distribute.bbclass +++ b/meta/classes/src_distribute.bbclass @@ -3,12 +3,12 @@ python do_distribute_sources () { l = bb.data.createCopy(d) bb.data.update_data(l) - sources_dir = d.getVar('SRC_DISTRIBUTEDIR', 1) - src_uri = d.getVar('SRC_URI', 1).split() + sources_dir = d.getVar('SRC_DISTRIBUTEDIR', True) + src_uri = d.getVar('SRC_URI', True).split() fetcher = bb.fetch2.Fetch(src_uri, d) ud = fetcher.ud - licenses = d.getVar('LICENSE', 1).replace('&', '|') + licenses = d.getVar('LICENSE', True).replace('&', '|') licenses = licenses.replace('(', '').replace(')', '') clean_licenses = "" for x in licenses.split(): @@ -20,7 +20,7 @@ python do_distribute_sources () { for license in clean_licenses.split('|'): for url in ud.values(): - cmd = d.getVar('SRC_DISTRIBUTECOMMAND', 1) + cmd = d.getVar('SRC_DISTRIBUTECOMMAND', True) if not cmd: raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined") url.setup_localpath(d) @@ -29,9 +29,9 @@ python do_distribute_sources () { if url.basename == '*': import os.path dest_dir = os.path.basename(os.path.dirname(os.path.abspath(url.localpath))) - d.setVar('DEST', "%s_%s/" % (d.getVar('PF', 1), dest_dir)) + d.setVar('DEST', "%s_%s/" % (d.getVar('PF', True), dest_dir)) else: - d.setVar('DEST', "%s_%s" % (d.getVar('PF', 1), url.basename)) + d.setVar('DEST', "%s_%s" % (d.getVar('PF', True), url.basename)) else: d.setVar('DEST', '') |