forked from pool/rpmlint
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
--- SpecCheck.py
|
|
+++ SpecCheck.py
|
|
@@ -186,7 +186,7 @@
|
|
lib = 0
|
|
if_depth = 0
|
|
ifarch_depth = -1
|
|
- current_section = 'package'
|
|
+ current_section = 'package'
|
|
buildroot_clean={'clean':0 , 'install':0}
|
|
buildroot_created={'clean':False , 'install':True}
|
|
depscript_override = 0
|
|
@@ -196,8 +196,11 @@
|
|
section = {}
|
|
buildrequires = set()
|
|
|
|
- for sec in ['description', 'prep', 'build', 'install', 'clean',
|
|
- 'files', 'changelog', 'package', 'check']:
|
|
+ for sec in ('description', 'prep', 'build', 'install', 'clean',
|
|
+ 'files', 'changelog', 'package', 'check',
|
|
+ 'pre', 'post', 'postun', 'trigger', 'triggerin',
|
|
+ 'triggerprein', 'triggerun', 'triggerpostun',
|
|
+ 'pretrans', 'posttrans'):
|
|
section[sec] = {
|
|
'count': 0,
|
|
're': re.compile('^%' + sec + '(?:\s|$)'),
|
|
@@ -223,7 +226,9 @@
|
|
if section_marker:
|
|
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())
|
|
|