Dirk Mueller
1d8d6856a8
* Avoid exception on inaccessible scripts * Print out the error content on UnicodeError to make flake8 happy * Fix flake8 warning about missing space around operators * Use compressions when checking for backup files * Account for arch specific code in /usr/share * Check for installed libtool wrapper files * Check for missing optional dependencies * Consider gnome help for doc files * Check for noarch package with files in lib64 * Verify if description is longer than summary * Explicitly tell users how to set URL * Ignore pytest_cache directory * confusing-invalid-spec-name * Ignore orig/rej leftovers after patching * Reenable Travis testing against Fedora Rawhide * Check all sections that should not use %buildroot in them * Put in default buildroot value used by Fedora/openSUSE * Stricter interpreter check * Use compileall to avoid %buildroot to be in pyc * Drop deprecated config file usage, 0.88 is pretty old anyway * Adjust Version to not print outdated Copyright * Rework Travis checks against latest Centos and Fedora releases * Fix exception handling * Fix various flake8-import-order test regressions * Blacklist newer pycodestyle warnings * Fix compatibility with file 5.33+ * Python 3.7.0b5 magic number is 3394 * Update TagsCheck.py * pyc related tests: DRY OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=648
55 lines
2.6 KiB
Diff
55 lines
2.6 KiB
Diff
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
|
===================================================================
|
|
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
|
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
|
@@ -420,6 +420,7 @@ lib_devel_number_regex = re.compile(r'^l
|
|
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
|
lib_package_regex = re.compile(r'(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
|
leading_space_regex = re.compile(r'^\s+')
|
|
+pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
|
|
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
|
|
invalid_version_regex = re.compile(r'([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
|
# () are here for grouping purpose in the regexp
|
|
@@ -639,10 +640,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
|
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 pkg_config_regex.match(fname) and 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)")
|
|
@@ -679,6 +682,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
|
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 = set()
|
|
for pf in pkg.files():
|
|
@@ -1126,6 +1138,11 @@ once.''',
|
|
'no-url-tag',
|
|
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
|
|
|
+'no-pkg-config-provides',
|
|
+'''The package installs 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
|