summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-11-16 17:22:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:10 +0000
commit9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a (patch)
tree6721fb09daa803d0e1b12a36be081ca9c20b0267
parentcaf1a69577b10bbb0e7914964e2ef4bb69c18def (diff)
downloadopenembedded-core-contrib-9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a.tar.gz
openembedded-core-contrib-9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a.tar.bz2
openembedded-core-contrib-9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a.zip
bitbake: ast: remove BBVERSIONS support
BBVERSIONS is moderately horrible and it doesn't appear to be actually used by anyone, so remove it to simplify the finalise codepaths. (Bitbake rev: 0bb188f01e396052b127e170a25246d79a6d6741) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/parse/ast.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 7020940df9..853dda86b4 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -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