revisioned (-r2 in 2.29-r2) versions brake comparator no more

This commit is contained in:
Andrey Abramov 2020-02-06 18:37:36 +03:00
parent 23fda458fd
commit da439272bd

View File

@ -1075,7 +1075,7 @@ def version_cmp(pkg1, pkg2, **kwargs):
if kwargs:
salt.utils.invalid_kwargs(kwargs)
regex = r'^(?:~|-|\*)?([^:\[\~\-\*]+):?[^\[]*\[?.*$'
regex = r'^(?:~|-|\*)?([^:\[\~\*]+):?[^\[]*\[?.*$'
ver1 = re.match(regex, pkg1)
ver2 = re.match(regex, pkg2)