|
@@ -30,8 +30,6 @@ import itertools
|
|
|
from bb import methodpool
|
|
|
from bb.parse import logger
|
|
|
|
|
|
-_bbversions_re = re.compile(r"\[(?P<from>[0-9]+)-(?P<to>[0-9]+)\]")
|
|
|
-
|
|
|
class StatementGroup(list):
|
|
|
def eval(self, data):
|
|
|
for statement in self:
|
|
@@ -385,27 +383,6 @@ def _create_variants(datastores, names, function, onlyfinalise):
|
|
|
else:
|
|
|
create_variant("%s-%s" % (variant, name), datastores[variant], name)
|
|
|
|
|
|
-def _expand_versions(versions):
|
|
|
- def expand_one(version, start, end):
|
|
|
- for i in range(start, end + 1):
|
|
|
- ver = _bbversions_re.sub(str(i), version, 1)
|
|
|
- yield ver
|
|
|
-
|
|
|
- versions = iter(versions)
|
|
|
- while True:
|
|
|
- try:
|
|
|
- version = next(versions)
|
|
|
- except StopIteration:
|
|
|
- break
|
|
|
-
|
|
|
- range_ver = _bbversions_re.search(version)
|
|
|
- if not range_ver:
|
|
|
- yield version
|
|
|
- else:
|
|
|
- newversions = expand_one(version, int(range_ver.group("from")),
|
|
|
- int(range_ver.group("to")))
|
|
|
- versions = itertools.chain(newversions, versions)
|
|
|
-
|
|
|
def multi_finalize(fn, d):
|
|
|
appends = (d.getVar("__BBAPPEND") or "").split()
|
|
|
for append in appends:
|
|
@@ -422,50 +399,6 @@ def multi_finalize(fn, d):
|
|
|
d.setVar("__SKIPPED", e.args[0])
|
|
|
datastores = {"": safe_d}
|
|
|
|
|
|
- versions = (d.getVar("BBVERSIONS") or "").split()
|
|
|
- if versions:
|
|
|
- pv = orig_pv = d.getVar("PV")
|
|
|
- baseversions = {}
|
|
|
-
|
|
|
- def verfunc(ver, d, pv_d = None):
|
|
|
- if pv_d is None:
|
|
|
- pv_d = d
|
|
|
-
|
|
|
- overrides = d.getVar("OVERRIDES").split(":")
|
|
|
- pv_d.setVar("PV", ver)
|
|
|
- overrides.append(ver)
|
|
|
- bpv = baseversions.get(ver) or orig_pv
|
|
|
- pv_d.setVar("BPV", bpv)
|
|
|
- overrides.append(bpv)
|
|
|
- d.setVar("OVERRIDES", ":".join(overrides))
|
|
|
-
|
|
|
- versions = list(_expand_versions(versions))
|
|
|
- for pos, version in enumerate(list(versions)):
|
|
|
- try:
|
|
|
- pv, bpv = version.split(":", 2)
|
|
|
- except ValueError:
|
|
|
- pass
|
|
|
- else:
|
|
|
- versions[pos] = pv
|
|
|
- baseversions[pv] = bpv
|
|
|
-
|
|
|
- if pv in versions and not baseversions.get(pv):
|
|
|
- versions.remove(pv)
|
|
|
- else:
|
|
|
- pv = versions.pop()
|
|
|
-
|
|
|
- # This is necessary because our existing main datastore
|
|
|
- # has already been finalized with the old PV, we need one
|
|
|
- # that's been finalized with the new PV.
|
|
|
- d = bb.data.createCopy(safe_d)
|
|
|
- verfunc(pv, d, safe_d)
|
|
|
- try:
|
|
|
- finalize(fn, d)
|
|
|
- except bb.parse.SkipRecipe as e:
|
|
|
- d.setVar("__SKIPPED", e.args[0])
|
|
|
-
|
|
|
- _create_variants(datastores, versions, verfunc, onlyfinalise)
|
|
|
-
|
|
|
extended = d.getVar("BBCLASSEXTEND") or ""
|
|
|
if extended:
|
|
|
# the following is to support bbextends with arguments, for e.g. multilib
|