summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-10 18:13:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-16 09:10:42 +0000
commit93c3f3922c477e8062c09492c94169276168db96 (patch)
tree2c7202a94f4f6952aba652fff23e3e52c195c563 /bitbake
parentb427750a5d8e2a2e1a675f68dea250eb25e94c8e (diff)
downloadast2050-yocto-poky-93c3f3922c477e8062c09492c94169276168db96.zip
ast2050-yocto-poky-93c3f3922c477e8062c09492c94169276168db96.tar.gz
bitbake: utils: ensure explode_dep_versions2 raises an exception on invalid/missing operator
We really want an error rather than the version to just be silently skipped when the operator is missing (e.g. "somepackage (1.0)" was specified instead of "somepackage (>= 1.0)".) (Bitbake rev: b6dc946f477adc40d68da16e2f2580cb3b4a10db) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 90090b2..7ba1234 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -53,6 +53,9 @@ def set_context(ctx):
# Context used in better_exec, eval
_context = clean_context()
+class VersionStringException(Exception):
+ """Exception raised when an invalid version specification is found"""
+
def explode_version(s):
r = []
alpha_regexp = re.compile('^([a-zA-Z]+)(.*)$')
@@ -188,6 +191,7 @@ def explode_dep_versions2(s):
i = i[1:]
else:
# This is an unsupported case!
+ raise VersionStringException('Invalid version specification in "(%s" - invalid or missing operator' % i)
lastcmp = (i or "")
i = ""
i.strip()
OpenPOWER on IntegriCloud