forked from pool/rpmlint
Ludwig Nussel
5ad6c8a066
+ add ghost file checks + print names of failed tests - fix update_git.sh - make sure tmpfiles are listed in %files (add-check-for-tmpfiles-created-at-r.diff) - don't complain about missingok ghost files (fix-ghost-file-handling.diff) - remove obsolete check for %defattr in spec files (remove-files-attr-not-set-check.diff) OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=328
65 lines
2.7 KiB
Diff
65 lines
2.7 KiB
Diff
From: Some One <nobody@opensuse.org>
|
|
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
|
Subject: [PATCH] remove-expand-macros.diff
|
|
|
|
commit 29e43a3e1676aa452f730a741d00ef4ac7baec96
|
|
Author: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Tue May 17 12:56:38 2011 +0200
|
|
|
|
remove-expand-macros.diff
|
|
---
|
|
TagsCheck.py | 27 ---------------------------
|
|
1 file changed, 27 deletions(-)
|
|
|
|
diff --git a/TagsCheck.py b/TagsCheck.py
|
|
index fc392e5..40ce77a 100644
|
|
--- a/TagsCheck.py
|
|
+++ b/TagsCheck.py
|
|
@@ -432,15 +432,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a-zA-z]+)*(\([^)]*\))*$')
|
|
# we assume that no rpm packages existed before rpm itself existed...
|
|
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
|
|
|
-private_so_paths = set()
|
|
-for path in ('%perl_archlib', '%perl_vendorarch', '%perl_sitearch',
|
|
- '%python_sitearch', '%ruby_sitearch', '%php_extdir'):
|
|
- epath = rpm.expandMacro(path)
|
|
- if epath != path:
|
|
- private_so_paths.add(epath)
|
|
- private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
|
|
- private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
|
|
-
|
|
_enchant_checkers = {}
|
|
|
|
|
|
@@ -886,30 +877,12 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
|
(Pkg.formatRequire(*obs),
|
|
Pkg.formatRequire(*prov)))
|
|
|
|
- expfmt = rpm.expandMacro("%{_build_name_fmt}")
|
|
- if pkg.isSource():
|
|
- # _build_name_fmt often (always?) ends up not outputting src/nosrc
|
|
- # as arch for source packages, do it ourselves
|
|
- expfmt = re.sub(r'(?i)%\{?ARCH\b\}?', pkg.arch, expfmt)
|
|
- expected = pkg.header.sprintf(expfmt).split("/")[-1]
|
|
- basename = os.path.basename(pkg.filename)
|
|
- if basename != expected:
|
|
- printWarning(pkg, 'non-coherent-filename', basename, expected)
|
|
-
|
|
for tag in ('Distribution', 'DistTag', 'ExcludeArch', 'ExcludeOS',
|
|
'Vendor'):
|
|
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
|
self._unexpanded_macros(pkg, tag,
|
|
Pkg.b2s(pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]))
|
|
|
|
- for path in private_so_paths:
|
|
- for fname, pkgfile in pkg.files().items():
|
|
- if fname.startswith(path):
|
|
- for prov in pkgfile.provides:
|
|
- if so_dep_regex.search(prov[0]):
|
|
- printWarning(pkg, "private-shared-object-provides",
|
|
- fname, Pkg.formatRequire(*prov))
|
|
-
|
|
def check_description(self, pkg, lang, ignored_words):
|
|
description = pkg.langtag(rpm.RPMTAG_DESCRIPTION, lang)
|
|
self._unexpanded_macros(pkg, '%%description -l %s' % lang, description)
|