Merge "Handle dotted versions in platform selectors"

This commit is contained in:
Jenkins 2017-07-11 17:02:03 +00:00 committed by Gerrit Code Review
commit 62a229abff
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -105,6 +105,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"))
@ -306,6 +308,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