summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:09 +0000
commitddaac5e4e3ebe71cb279a33a6585b3e8a8790e55 (patch)
tree5dc9c0d3e1da1edacad1e6b8748c4db22026f011
parent1fce7ecbbb004a5ad82da3eef79cfd52b276708d (diff)
downloadopenembedded-core-contrib-ddaac5e4e3ebe71cb279a33a6585b3e8a8790e55.tar.gz
openembedded-core-contrib-ddaac5e4e3ebe71cb279a33a6585b3e8a8790e55.tar.bz2
openembedded-core-contrib-ddaac5e4e3ebe71cb279a33a6585b3e8a8790e55.zip
bitbake: bitbake: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (Bitbake rev: c19baa8c19ea8ab9b9b64fd30298d8764c6fd2cd) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-worker2
-rw-r--r--bitbake/lib/bb/build.py6
-rw-r--r--bitbake/lib/bb/cache.py2
-rw-r--r--bitbake/lib/bb/cookerdata.py2
-rw-r--r--bitbake/lib/bb/data.py8
-rw-r--r--bitbake/lib/bb/data_smart.py4
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
-rw-r--r--bitbake/lib/bb/parse/ast.py2
-rw-r--r--bitbake/lib/bb/tests/parse.py2
9 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 8d043946cb..10de54c9c3 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -243,7 +243,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
the_data.setVar(e, fakeenv[e])
the_data.setVarFlag(e, 'export', "1")
- task_exports = the_data.getVarFlag(taskname, 'exports', True)
+ task_exports = the_data.getVarFlag(taskname, 'exports')
if task_exports:
for e in task_exports.split():
the_data.setVarFlag(e, 'export', '1')
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index bdd83cd955..7a7aabb853 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -377,7 +377,7 @@ exit $ret
else:
logfile = sys.stdout
- progress = d.getVarFlag(func, 'progress', True)
+ progress = d.getVarFlag(func, 'progress')
if progress:
if progress == 'percent':
# Use default regex
@@ -669,7 +669,7 @@ def stamp_internal(taskname, d, file_name, baseonly=False, noextra=False):
else:
stamp = d.getVar('STAMP')
file_name = d.getVar('BB_FILENAME')
- extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
+ extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info') or ""
if baseonly:
return stamp
@@ -705,7 +705,7 @@ def stamp_cleanmask_internal(taskname, d, file_name):
else:
stamp = d.getVar('STAMPCLEAN')
file_name = d.getVar('BB_FILENAME')
- extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
+ extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info') or ""
if not stamp:
return []
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 131abbb1f8..c04ac13735 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -71,7 +71,7 @@ class RecipeInfoCommon(object):
@classmethod
def flaglist(cls, flag, varlist, metadata, squash=False):
- out_dict = dict((var, metadata.getVarFlag(var, flag, True))
+ out_dict = dict((var, metadata.getVarFlag(var, flag))
for var in varlist)
if squash:
return dict((k,v) for (k,v) in out_dict.items() if v)
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 680f79a3ec..320bb5906c 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -369,7 +369,7 @@ class CookerDataBuilder(object):
parselog.critical("Undefined event handler function '%s'" % var)
sys.exit(1)
handlerln = int(data.getVarFlag(var, "lineno", False))
- bb.event.register(var, data.getVar(var, False), (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
+ bb.event.register(var, data.getVar(var, False), (data.getVarFlag(var, "eventmask") or "").split(), handlerfn, handlerln)
data.setVar('BBINCLUDED',bb.parse.get_file_depends(data))
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 02a1140d0f..0f05b609e0 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -226,7 +226,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
o.write('\n')
emit_var(func, o, d, False) and o.write('\n')
newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func))
- newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
+ newdeps |= set((d.getVarFlag(func, "vardeps") or "").split())
seen = set()
while newdeps:
deps = newdeps
@@ -236,7 +236,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
if d.getVarFlag(dep, "func", False) and not d.getVarFlag(dep, "python", False):
emit_var(dep, o, d, False) and o.write('\n')
newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep))
- newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
+ newdeps |= set((d.getVarFlag(dep, "vardeps") or "").split())
newdeps -= seen
_functionfmt = """
@@ -259,7 +259,7 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
pp = bb.codeparser.PythonParser(func, logger)
pp.parse_python(d.getVar(func, False))
newdeps = pp.execs
- newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
+ newdeps |= set((d.getVarFlag(func, "vardeps") or "").split())
seen = set()
while newdeps:
deps = newdeps
@@ -271,7 +271,7 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
pp = bb.codeparser.PythonParser(dep, logger)
pp.parse_python(d.getVar(dep, False))
newdeps |= pp.execs
- newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
+ newdeps |= set((d.getVarFlag(dep, "vardeps") or "").split())
newdeps -= seen
def update_data(d):
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 482399a95d..be43eb9be3 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -108,7 +108,7 @@ class VariableParse:
varparse = self.d.expand_cache[key]
var = varparse.value
else:
- var = self.d.getVarFlag(key, "_content", True)
+ var = self.d.getVarFlag(key, "_content")
self.references.add(key)
if var is not None:
return var
@@ -122,7 +122,7 @@ class VariableParse:
parser = bb.codeparser.PythonParser(self.varname, logger)
parser.parse_python(code)
if self.varname:
- vardeps = self.d.getVarFlag(self.varname, "vardeps", True)
+ vardeps = self.d.getVarFlag(self.varname, "vardeps")
if vardeps is None:
parser.log.flush()
else:
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index ced43630ea..2bb41a4a94 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1180,13 +1180,13 @@ class FetchData(object):
elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
self.md5_expected = None
else:
- self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name, True)
+ self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name)
if self.sha256_name in self.parm:
self.sha256_expected = self.parm[self.sha256_name]
elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
self.sha256_expected = None
else:
- self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name, True)
+ self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
self.ignore_checksums = False
self.names = self.parm.get("name",'default').split(',')
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index a3990e5b3e..7020940df9 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -347,7 +347,7 @@ def finalize(fn, d, variant = None):
if not handlerfn:
bb.fatal("Undefined event handler function '%s'" % var)
handlerln = int(d.getVarFlag(var, "lineno", False))
- bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
+ bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask") or "").split(), handlerfn, handlerln)
bb.event.fire(bb.event.RecipePreFinalise(fn), d)
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index 86e86ed711..ab6ca90317 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -81,7 +81,7 @@ unset B[flag]
f = self.parsehelper(self.unsettest)
d = bb.parse.handle(f.name, self.d)['']
self.assertEqual(d.getVar("A"), None)
- self.assertEqual(d.getVarFlag("A","flag", True), None)
+ self.assertEqual(d.getVarFlag("A","flag"), None)
self.assertEqual(d.getVar("B"), "2")