SHA256
1
0
forked from pool/rpmlint
rpmlint/selfconflicts-provide.diff

31 lines
1.2 KiB
Diff

--- TagsCheck.py
+++ TagsCheck.py
@@ -665,6 +665,7 @@ class TagsCheck(AbstractCheck.AbstractCheck):
obs=map(lambda x: x[0], pkg.obsoletes())
provs=map(lambda x: x[0].split(':/')[0], pkg.provides())
+ conflicts=map(lambda x: x[0].split(':/')[0], pkg.conflicts())
reqs=map(lambda x: x[0], pkg.requires() + pkg.prereq())
if pkg.name in obs:
printError(pkg, 'obsolete-on-name')
@@ -677,6 +678,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
useless_provides=set()
for p in provs:
+ if p in conflicts:
+ printWarning(pkg,'conflicts-with-provides', p)
if provs.count(p) != 1:
if p not in useless_provides:
useless_provides.add(p)
@@ -776,6 +779,10 @@ the Release tag.''',
'''There is no Name tag in your package. You have to specify a name using the
Name tag.''',
+'conflicts-with-provides',
+'''The same symbolic name is provided and conflicted. This package might be
+uninstallable, if versioning matches''',
+
'non-coherent-filename',
'''The file which contains the package should be named
<NAME>-<VERSION>-<RELEASE>.<ARCH>.rpm.''',