Handle dotted versions in platform selectors
openSUSE 42.2 seems to be the only platform still with dots in the version number, so adjust the selector parsing rules to accept that as valid input (as generated by profiles on openSUSE) Change-Id: If4adcc7b08f70abb0f1bcb43f95c73d382e4c0e5 Story: 2001042
This commit is contained in:
parent
c47e81959e
commit
21309b9eb4
|
@ -46,7 +46,7 @@ lowercase = ('a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j'|'k'|'l'|'m'|'n'|'o'|'p'
|
|||
|'q'|'r'|'s'|'t'|'u'|'v'|'w'|'x'|'y'|'z')
|
||||
name = letterOrDigit:start (letterOrDigit|'.'|'+'|'-'|'_'|'/')+:rest
|
||||
ws = ' '+
|
||||
profile = ('!'?:neg <(lowercase|digit|':'|'-')+>:name) -> (neg!='!', name)
|
||||
profile = ('!'?:neg <(lowercase|digit|':'|'-'|'.')+>:name) -> (neg!='!', name)
|
||||
selector = ws '[' profile:p1 (ws profile)*:p2 ']' -> [p1] + p2
|
||||
oneversion = <('<=' | '<' | '!=' | '==' | '>=' | '>')>:rel <debversion>:v -> (
|
||||
rel, v)
|
||||
|
|
|
@ -104,6 +104,8 @@ class TestDepends(TestCase):
|
|||
Contains("platform:opensuseproject"))
|
||||
self.assertThat(platform_profiles,
|
||||
Contains("platform:opensuse"))
|
||||
self.assertThat(platform_profiles,
|
||||
Contains("platform:opensuseproject-14.04"))
|
||||
self.assertThat(platform_profiles,
|
||||
Contains("platform:suse"))
|
||||
|
||||
|
@ -299,6 +301,7 @@ class TestDepends(TestCase):
|
|||
bar [something]
|
||||
category/packagename # for gentoo
|
||||
baz [platform:this platform:that-those]
|
||||
blaz [platform:rpm !platform:opensuseproject-42.2]
|
||||
quux [anotherthing !nothing] <=12
|
||||
womp # and a comment
|
||||
# a standalone comment and a blank line
|
||||
|
|
Loading…
Reference in New Issue