Update pkg.py:_get_comparison_spec regexp to strip use flags.

This commit is contained in:
Antsiferov Grigory 2017-10-25 13:50:44 +03:00
parent 4f09e2727d
commit 34d6c37d76

View File

@ -158,7 +158,7 @@ def _get_comparison_spec(pkgver):
comparison operator was passed, the comparison is assumed to be an "equals"
comparison, and "==" will be the operator returned.
'''
match = re.match('^~?([<>])?(=)?([^<>=]+)$', pkgver)
match = re.match('^~?([<>])?(=)?([^<>=]+?)(?:\[.+\])?$', pkgver)
if not match:
raise CommandExecutionError(
'Invalid version specification \'{0}\'.'.format(pkgver)