]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts: remove True option to getVarFlag calls
authorJoshua Lock <joshua.g.lock@intel.com>
Wed, 14 Dec 2016 21:13:07 +0000 (21:13 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Dec 2016 08:30:03 +0000 (08:30 +0000)
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\)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/append.py
scripts/verify-bashisms

index def4f9027cf9e8faf1d0dd5ad1fc5b59d401903e..69c8bb77a045b3e25577780f926ced9e7229e96f 100644 (file)
@@ -121,7 +121,7 @@ def determine_file_source(targetpath, rd):
         logger.debug('source path: %s' % srcpath)
         if not srcpath.startswith('/'):
             # Handle non-absolute path
-            srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs', True).split()[-1], srcpath))
+            srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs').split()[-1], srcpath))
         if srcpath.startswith(workdir):
             # OK, now we have the source file name, look for it in SRC_URI
             workdirfile = os.path.relpath(srcpath, workdir)
@@ -191,10 +191,10 @@ def get_source_path(cmdelements):
 def get_func_deps(func, d):
     """Find the function dependencies of a shell function"""
     deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func))
-    deps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
+    deps |= set((d.getVarFlag(func, "vardeps") or "").split())
     funcdeps = []
     for dep in deps:
-        if d.getVarFlag(dep, 'func', True):
+        if d.getVarFlag(dep, 'func'):
             funcdeps.append(dep)
     return funcdeps
 
index 0741e184477af40e61e4ac680fa2e945c53ad04f..a8f761d4c532f3444f8e135bf466cfdc0a66b0ec 100755 (executable)
@@ -97,7 +97,7 @@ if __name__=='__main__':
         result = []
         data = tinfoil.parse_recipe_file(fn)
         for key in data.keys():
-            if data.getVarFlag(key, "func", True) and not data.getVarFlag(key, "python", True):
+            if data.getVarFlag(key, "func") and not data.getVarFlag(key, "python"):
                 script = data.getVar(key, False)
                 if not script: continue
                 #print ("%s:%s" % (fn, key))