mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d5e67725ac
commit
c4e2c59088
+15
-15
@@ -23,13 +23,13 @@ def ifelse(condition, iftrue = True, iffalse = False):
|
||||
return iffalse
|
||||
|
||||
def conditional(variable, checkvalue, truevalue, falsevalue, d):
|
||||
if d.getVar(variable, True) == checkvalue:
|
||||
if d.getVar(variable) == checkvalue:
|
||||
return truevalue
|
||||
else:
|
||||
return falsevalue
|
||||
|
||||
def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
|
||||
if float(d.getVar(variable, True)) <= float(checkvalue):
|
||||
if float(d.getVar(variable)) <= float(checkvalue):
|
||||
return truevalue
|
||||
else:
|
||||
return falsevalue
|
||||
@@ -42,8 +42,8 @@ def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
|
||||
return falsevalue
|
||||
|
||||
def both_contain(variable1, variable2, checkvalue, d):
|
||||
val1 = d.getVar(variable1, True)
|
||||
val2 = d.getVar(variable2, True)
|
||||
val1 = d.getVar(variable1)
|
||||
val2 = d.getVar(variable2)
|
||||
val1 = set(val1.split())
|
||||
val2 = set(val2.split())
|
||||
if isinstance(checkvalue, str):
|
||||
@@ -66,8 +66,8 @@ def set_intersect(variable1, variable2, d):
|
||||
s3 = set_intersect(s1, s2)
|
||||
=> s3 = "b c"
|
||||
"""
|
||||
val1 = set(d.getVar(variable1, True).split())
|
||||
val2 = set(d.getVar(variable2, True).split())
|
||||
val1 = set(d.getVar(variable1).split())
|
||||
val2 = set(d.getVar(variable2).split())
|
||||
return " ".join(val1 & val2)
|
||||
|
||||
def prune_suffix(var, suffixes, d):
|
||||
@@ -77,7 +77,7 @@ def prune_suffix(var, suffixes, d):
|
||||
if var.endswith(suffix):
|
||||
var = var.replace(suffix, "")
|
||||
|
||||
prefix = d.getVar("MLPREFIX", True)
|
||||
prefix = d.getVar("MLPREFIX")
|
||||
if prefix and var.startswith(prefix):
|
||||
var = var.replace(prefix, "")
|
||||
|
||||
@@ -115,9 +115,9 @@ def features_backfill(var,d):
|
||||
# disturbing distributions that have already set DISTRO_FEATURES.
|
||||
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
|
||||
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
|
||||
features = (d.getVar(var, True) or "").split()
|
||||
backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
|
||||
considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
|
||||
features = (d.getVar(var) or "").split()
|
||||
backfill = (d.getVar(var+"_BACKFILL") or "").split()
|
||||
considered = (d.getVar(var+"_BACKFILL_CONSIDERED") or "").split()
|
||||
|
||||
addfeatures = []
|
||||
for feature in backfill:
|
||||
@@ -133,12 +133,12 @@ def packages_filter_out_system(d):
|
||||
Return a list of packages from PACKAGES with the "system" packages such as
|
||||
PN-dbg PN-doc PN-locale-eb-gb removed.
|
||||
"""
|
||||
pn = d.getVar('PN', True)
|
||||
pn = d.getVar('PN')
|
||||
blacklist = [pn + suffix for suffix in ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')]
|
||||
localepkg = pn + "-locale-"
|
||||
pkgs = []
|
||||
|
||||
for pkg in d.getVar('PACKAGES', True).split():
|
||||
for pkg in d.getVar('PACKAGES').split():
|
||||
if pkg not in blacklist and localepkg not in pkg:
|
||||
pkgs.append(pkg)
|
||||
return pkgs
|
||||
@@ -231,7 +231,7 @@ def format_pkg_list(pkg_dict, ret_format=None):
|
||||
return '\n'.join(output)
|
||||
|
||||
def host_gcc_version(d):
|
||||
compiler = d.getVar("BUILD_CC", True)
|
||||
compiler = d.getVar("BUILD_CC")
|
||||
retval, output = getstatusoutput("%s --version" % compiler)
|
||||
if retval:
|
||||
bb.fatal("Error running %s --version: %s" % (compiler, output))
|
||||
@@ -316,8 +316,8 @@ def write_ld_so_conf(d):
|
||||
bb.utils.remove(ldsoconf)
|
||||
bb.utils.mkdirhier(os.path.dirname(ldsoconf))
|
||||
with open(ldsoconf, "w") as f:
|
||||
f.write(d.getVar("base_libdir", True) + '\n')
|
||||
f.write(d.getVar("libdir", True) + '\n')
|
||||
f.write(d.getVar("base_libdir") + '\n')
|
||||
f.write(d.getVar("libdir") + '\n')
|
||||
|
||||
class ImageQAFailed(bb.build.FuncFailed):
|
||||
def __init__(self, description, name=None, logfile=None):
|
||||
|
||||
Reference in New Issue
Block a user