Line
Link Here
|
0 |
-- src/java_config_2/VersionManager.py.old 2013-02-15 02:12:09.000000000 +0400 |
0 |
++ src/java_config_2/VersionManager.py 2015-04-27 15:36:02.467389500 +0300 |
Lines 51-57
Link Here
|
51 |
""" |
51 |
""" |
52 |
Used to parse dependency strings, and find the best/prefered vm to use. |
52 |
Used to parse dependency strings, and find the best/prefered vm to use. |
53 |
""" |
53 |
""" |
54 |
atom_parser = re.compile(r"([<>=]*)virtual/(jre|jdk)[-:]([0-9\.*]+)") |
54 |
atom_parser = re.compile(r"([<>=]*)virtual/(jre|jdk)(-([0-9\.*]+))?(:([0-9\.]+=?|=|\*))?") |
55 |
virtuals_parser = re.compile(r"([<>=~]+)?java-virtuals/([\w\-\.:]+)") |
55 |
virtuals_parser = re.compile(r"([<>=~]+)?java-virtuals/([\w\-\.:]+)") |
56 |
package_parser = re.compile(r"([\w\-]+)/([\w\-]+)(?:\:(\d+))?") |
56 |
package_parser = re.compile(r"([\w\-]+)/([\w\-]+)(?:\:(\d+))?") |
Lines 88-94
Link Here
|
88 |
if len(matches) > 0: |
88 |
if len(matches) > 0: |
89 |
for match in matches: |
89 |
for match in matches: |
90 |
matched_atoms.append(_DepSpec(equality=match[0], type=match[1], version=match[2])) |
90 |
equality=match[0] |
|
|
91 |
if match[3]: # if version is nonempty use it |
92 |
ver = match[3] |
93 |
elif match[5] and match[5] != "=" and match[5] != '*': # fallback to probe the slot value |
94 |
ver = match[5] |
95 |
if ver[-1] == '=': |
96 |
ver = ver[:-1] |
97 |
else: |
98 |
equality='*' # match case without version in a special way |
99 |
ver='0' |
100 |
matched_atoms.append(_DepSpec(equality=equality, type=match[1], version=ver)) |
91 |
matched_atoms.sort() |
101 |
matched_atoms.sort() |
92 |
matched_atoms.reverse() |
102 |
matched_atoms.reverse() |
Lines 149-155
Link Here
|
149 |
#now assuming that if no operator we are |
159 |
#now assuming that if no operator we are |
150 |
#doing an '=' comparision. Used to handle cases like virtual/jdk:1.5 |
160 |
#doing an '=' comparision. Used to handle cases like virtual/jdk:1.5 |
151 |
if operator == '>=': return val >= 0 |
161 |
if operator == '*': return True |
|
|
162 |
elif operator == '>=': return val >= 0 |
152 |
elif operator == '<=': return val <= 0 |
163 |
elif operator == '<=': return val <= 0 |
153 |
elif operator == '>': return val > 0 |
164 |
elif operator == '>': return val > 0 |
154 |
elif operator == '<': return val < 0 |
165 |
elif operator == '<': return val < 0 |