forked from pool/rpmlint
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
|
--- TagsCheck.py
|
||
|
+++ TagsCheck.py
|
||
|
@@ -603,10 +603,12 @@
|
||
|
base = is_devel.group(1)
|
||
|
dep = None
|
||
|
has_so = False
|
||
|
+ has_pc = False
|
||
|
for fname in pkg.files():
|
||
|
if fname.endswith('.so'):
|
||
|
has_so = True
|
||
|
- break
|
||
|
+ if fname.endswith('.pc'):
|
||
|
+ has_pc = True
|
||
|
if has_so:
|
||
|
base_or_libs = base + '/' + base + '-libs/lib' + base
|
||
|
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||
|
@@ -643,6 +645,15 @@
|
||
|
if prov not in (x[0] for x in pkg.provides()):
|
||
|
printWarning(pkg, 'no-provides', prov)
|
||
|
|
||
|
+ if has_pc:
|
||
|
+ found_pkg_config_dep = False
|
||
|
+ for p in (x[0] for x in pkg.provides()):
|
||
|
+ if (p.startswith("pkgconfig(")):
|
||
|
+ found_pkg_config_dep = True
|
||
|
+ break
|
||
|
+ if not found_pkg_config_dep:
|
||
|
+ printWarning(pkg, 'no-pkg-config-provides')
|
||
|
+
|
||
|
# List of words to ignore in spell check
|
||
|
ignored_words = [x.split('/')[-1] for x in pkg.files()]
|
||
|
|
||
|
@@ -1049,6 +1060,11 @@
|
||
|
'no-url-tag',
|
||
|
'''The URL tag is missing.''',
|
||
|
|
||
|
+'no-pkg-config-provides',
|
||
|
+'''The package installes a .pc file but does not provide pkgconfig(..) provides.
|
||
|
+The most likely reason for that is that it was built without BuildRequires: pkg-config.
|
||
|
+Please double check your build dependencies.''',
|
||
|
+
|
||
|
'name-repeated-in-summary',
|
||
|
'''The name of the package is repeated in its summary. This is often redundant
|
||
|
information and looks silly in various programs' output. Make the summary
|