Move RPM_SCRIPTLETS to PostCheck

This commit is contained in:
Ville Skyttä 2014-05-29 21:12:19 +03:00
parent 6359a6e9f5
commit b2bc56a5c6
3 changed files with 8 additions and 8 deletions

View File

@ -1,3 +0,0 @@
RPM_SCRIPTLETS = ['pre','post','preun','postun','pretrans','posttrans',
'trigger','triggerin','triggerprein','triggerun',
'triggerun','triggerpostun','verifyscript']

View File

@ -17,9 +17,12 @@ from Filter import addDetails, printError, printWarning
import AbstractCheck
import Config
import Pkg
import Common
RPM_SCRIPTLETS = ('pre', 'post', 'preun', 'postun', 'pretrans', 'posttrans',
'trigger', 'triggerin', 'triggerprein', 'triggerun',
'triggerun', 'triggerpostun', 'verifyscript')
DEFAULT_VALID_SHELLS = ('<lua>',
'/bin/sh',
'/bin/bash',
@ -199,7 +202,7 @@ addDetails(
'postin-without-ghost-file-creation',
'''A file tagged as ghost is not created during %prein nor during %postin.''',
)
for scriptlet in map(lambda x: '%' + x ,Common.RPM_SCRIPTLETS):
for scriptlet in map(lambda x: '%' + x, RPM_SCRIPTLETS):
addDetails(
'one-line-command-in-%s' % scriptlet,
'''You should use %s -p <command> instead of using:

View File

@ -17,11 +17,11 @@ except ImportError: # Python 3
import rpm
from Filter import addDetails, printError, printWarning
from PostCheck import RPM_SCRIPTLETS
from TagsCheck import VALID_GROUPS
import AbstractCheck
import Config
import Pkg
import Common
# Don't check for hardcoded library paths in biarch packages
DEFAULT_BIARCH_PACKAGES = '^(gcc|glibc)'
@ -69,8 +69,8 @@ defattr_regex = re.compile('^\s*%defattr\\b')
attr_regex = re.compile('^\s*%attr\\b')
section_regexs = dict(
([x, re.compile('^%' + x + '(?:\s|$)')]
for x in ['build', 'changelog', 'check', 'clean', 'description', 'files',
'install', 'package', 'prep'] + Common.RPM_SCRIPTLETS))
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
'install', 'package', 'prep') + RPM_SCRIPTLETS))
deprecated_grep_regex = re.compile(r'\b[ef]grep\b')
# Only check for /lib, /usr/lib, /usr/X11R6/lib