2015-04-10 16:35:46 +02:00
|
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
|
|
Date: Fri, 10 Apr 2015 14:54:18 +0200
|
|
|
|
Subject: [PATCH] check for self provides
|
|
|
|
|
|
|
|
---
|
|
|
|
TagsCheck.py | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
2019-01-13 15:33:18 +01:00
|
|
|
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
2017-09-28 13:35:09 +02:00
|
|
|
===================================================================
|
2019-01-13 15:33:18 +01:00
|
|
|
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
|
|
|
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
|
|
|
@@ -874,6 +874,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
|
|
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
|
|
|
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
|
|
|
|
|
|
|
+ for p in pkg.provides():
|
2015-04-10 16:35:46 +02:00
|
|
|
+ if p[0] == pkg.name and not p[1]:
|
|
|
|
+ printError(pkg, 'unversioned-explicit-self-provides', p[0])
|
2019-01-13 15:33:18 +01:00
|
|
|
+
|
|
|
|
for o in (x for x in obs_names if x not in prov_names):
|
|
|
|
printWarning(pkg, 'obsolete-not-provided', o)
|
|
|
|
for o in pkg.obsoletes():
|
|
|
|
@@ -1219,6 +1223,10 @@ objects should thus not be depended on a
|
2015-04-10 16:35:46 +02:00
|
|
|
in the containing package. Get rid of the provides if appropriate, for example
|
|
|
|
by filtering it out during build. Note that in some cases this may require
|
|
|
|
disabling rpmbuild's internal dependency generator.''',
|
|
|
|
+
|
|
|
|
+'unversioned-explicit-self-provides',
|
|
|
|
+'''This package provides it's own name explicitely, which might break
|
|
|
|
+upgrade path. self-provides are autogenerated. Remove the provide.''',
|
|
|
|
)
|
|
|
|
|
2017-09-28 13:35:09 +02:00
|
|
|
for i in ("obsoletes", "conflicts", "provides", "recommends", "suggests",
|