SHA256
1
0
forked from pool/rpmlint

Accepting request 53055 from Base:System

Accepted submit request 53055 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/53055
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=80
This commit is contained in:
Ruediger Oertel 2010-11-16 00:16:49 +00:00 committed by Git OBS Bridge
parent d88d1fe65b
commit c273979fe8
5 changed files with 74 additions and 1 deletions

47
remove-expand-macros.diff Normal file
View File

@ -0,0 +1,47 @@
--- TagsCheck.py
+++ TagsCheck.py
@@ -427,13 +427,6 @@
sentence_break_regex = re.compile(r'(^|[.:;!?])\s*$')
so_dep_regex = re.compile(r'\.so(\.[0-9a-zA-z]+)*(\([^)]*\))*$')
-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)
-
_enchant_checkers = {}
def spell_check(pkg, str, fmt, lang, ignored):
@@ -814,30 +807,12 @@
(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)

View File

@ -66,7 +66,7 @@ setOption("ValidGroups", (
"Documentation/Howto" ,\
"Documentation/Man" ,\
"Documentation/Other" ,\
"Documentation/SuSE" ,\
"Documentation/SUSE" ,\
"Hardware/Camera" ,\
"Hardware/Fax" ,\
"Hardware/ISDN" ,\

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Nov 15 17:14:55 CET 2010 - dmueller@suse.de
- change Documentation/SuSE to /SUSE (bnc#618716)
- whitelist "openSUSE" at start of Summary (bnc#618716)
-------------------------------------------------------------------
Sun Nov 14 19:21:20 UTC 2010 - dmueller@suse.de
- remove invocations of expandMacro()
-------------------------------------------------------------------
Thu Nov 11 08:55:56 CET 2010 - dmueller@suse.de

View File

@ -118,6 +118,8 @@ Patch76: confusing-invalid-spec-name.patch
Patch77: rpmlint-pkg-quoting.diff
Patch78: suse-g-ir-chech.diff
Patch79: rpmlint-fscaps.diff
Patch80: remove-expand-macros.diff
Patch81: suse-whitelist-opensuse.diff
%py_requires
%description
@ -192,6 +194,8 @@ Authors:
%patch77
%patch78
%patch79 -p1
%patch80
%patch81
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .

View File

@ -0,0 +1,11 @@
--- TagsCheck.py
+++ TagsCheck.py
@@ -868,7 +868,7 @@
spell_check(pkg, utf8summary, 'Summary(%s)', lang, ignored_words)
if '\n' in summary:
printError(pkg, 'summary-on-multiple-lines', lang)
- if summary[0] != summary[0].upper():
+ if summary[0] != summary[0].upper() and not summary.startswith("openSUSE"):
printWarning(pkg, 'summary-not-capitalized', lang, summary)
if summary[-1] == '.':
printWarning(pkg, 'summary-ended-with-dot', lang, summary)