forked from pool/rpmlint
27 lines
915 B
Diff
27 lines
915 B
Diff
|
--- Pkg.py
|
||
|
+++ Pkg.py
|
||
|
@@ -403,10 +403,19 @@
|
||
|
current_version=d[1]
|
||
|
if current_version.find(':') > 0:
|
||
|
current_version=''.join(current_version.split(':')[1:])
|
||
|
- if d[2] & rpm.RPMSENSE_EQUAL != rpm.RPMSENSE_EQUAL or current_version != version:
|
||
|
- return 0
|
||
|
- else:
|
||
|
- return 1
|
||
|
+
|
||
|
+ if d[2] & rpm.RPMSENSE_EQUAL:
|
||
|
+ if current_version == version:
|
||
|
+ return 1
|
||
|
+
|
||
|
+ if d[2] & rpm.RPMSENSE_GREATER:
|
||
|
+ if current_version.count('.') > version.count('.'):
|
||
|
+ current_version = '.'.join(current_version.split('.')[0:version.count('.')])
|
||
|
+
|
||
|
+ if current_version == version:
|
||
|
+ return 1
|
||
|
+
|
||
|
+ return 0
|
||
|
return 0
|
||
|
|
||
|
def conflicts(self):
|