2011-05-19 16:19:35 +02:00
|
|
|
commit 29e43a3e1676aa452f730a741d00ef4ac7baec96
|
|
|
|
Author: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
|
|
Date: Tue May 17 12:56:38 2011 +0200
|
|
|
|
|
|
|
|
remove-expand-macros.diff
|
|
|
|
|
2011-04-21 12:12:02 +02:00
|
|
|
Index: TagsCheck.py
|
|
|
|
===================================================================
|
|
|
|
--- TagsCheck.py.orig
|
2010-11-16 01:16:49 +01:00
|
|
|
+++ TagsCheck.py
|
2011-05-19 16:19:35 +02:00
|
|
|
@@ -433,15 +433,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
|
2011-04-21 12:12:02 +02:00
|
|
|
# we assume that no rpm packages existed before rpm itself existed...
|
|
|
|
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
2010-11-16 01:16:49 +01:00
|
|
|
|
|
|
|
-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)
|
2011-05-19 16:19:35 +02:00
|
|
|
- private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
|
|
|
|
- private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
|
2010-11-16 01:16:49 +01:00
|
|
|
-
|
|
|
|
_enchant_checkers = {}
|
|
|
|
def spell_check(pkg, str, fmt, lang, ignored):
|
|
|
|
|
2012-09-13 18:01:40 +02:00
|
|
|
@@ -856,30 +847,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
2010-11-16 01:16:49 +01:00
|
|
|
(apply(Pkg.formatRequire, obs),
|
|
|
|
apply(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[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, apply(Pkg.formatRequire, prov))
|
|
|
|
-
|
|
|
|
|
|
|
|
def check_description(self, pkg, lang, ignored_words):
|
|
|
|
description = pkg.langtag(rpm.RPMTAG_DESCRIPTION, lang)
|