SHA256
1
0
forked from pool/rpmlint
rpmlint/buildroot-in-scripts.diff
OBS User autobuild 23044a1498 Accepting request 38983 from Base:System
Copy from Base:System/rpmlint based on submit request 38983 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/38983
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=59
2010-04-28 20:41:49 +00:00

28 lines
1.2 KiB
Diff

Index: SpecCheck.py
===================================================================
--- SpecCheck.py.orig
+++ SpecCheck.py
@@ -60,7 +60,10 @@ suse_version_regex = re.compile('%suse_v
section_regexs = dict(
([x, re.compile('^%' + x + '(?:\s|$)')]
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
- 'install', 'package', 'prep')))
+ 'install', 'package', 'prep',
+ 'pre', 'post', 'postun', 'trigger', 'triggerin',
+ 'triggerprein', 'triggerun', 'triggerpostun',
+ 'pretrans', 'posttrans')))
# Only check for /lib, /usr/lib, /usr/X11R6/lib
# TODO: better handling of X libraries and modules.
@@ -265,7 +268,9 @@ class SpecCheck(AbstractCheck.AbstractCh
continue
- if current_section in ('prep', 'build'):
+ if current_section in ('prep', 'build', 'pre', 'post', 'postun',
+ 'trigger', 'triggerin', 'triggerprein', 'triggerun', 'triggerpostun',
+ 'pretrans', 'posttrans'):
if contains_buildroot(line):
printWarning(pkg, 'rpm-buildroot-usage',
'%' + current_section, line[:-1].strip())