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(+)
|
|
|
|
|
|
|
|
diff --git a/TagsCheck.py b/TagsCheck.py
|
2015-11-26 11:24:13 +01:00
|
|
|
index 8071f1d..39b7544 100644
|
2015-04-10 16:35:46 +02:00
|
|
|
--- a/TagsCheck.py
|
|
|
|
+++ b/TagsCheck.py
|
2015-11-26 11:24:13 +01:00
|
|
|
@@ -847,6 +847,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
2015-04-10 16:35:46 +02:00
|
|
|
for p in pkg.provides():
|
|
|
|
value = Pkg.formatRequire(*p)
|
|
|
|
self._unexpanded_macros(pkg, 'Provides %s' % (value,), value)
|
|
|
|
+ if p[0] == pkg.name and not p[1]:
|
|
|
|
+ printError(pkg, 'unversioned-explicit-self-provides', p[0])
|
|
|
|
|
|
|
|
for c in pkg.conflicts():
|
|
|
|
value = Pkg.formatRequire(*c)
|
2015-11-26 11:24:13 +01:00
|
|
|
@@ -1175,6 +1177,10 @@ objects should thus not be depended on and they should not result in provides
|
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.''',
|
|
|
|
)
|
|
|
|
|
2015-11-26 11:24:13 +01:00
|
|
|
for i in "obsoletes", "conflicts", "provides", "recommends", "suggests", \
|