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>
This commit is contained in:
parent
b427750a5d
commit
93c3f3922c
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue