forked from pool/rpmlint
45 lines
2.7 KiB
Diff
45 lines
2.7 KiB
Diff
|
--- InitScriptCheck.py
|
||
|
+++ InitScriptCheck.py
|
||
|
@@ -101,13 +101,13 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||
|
in_lsb_tag = 0
|
||
|
for i in lsb_tags.keys():
|
||
|
if len(lsb_tags[i]) != 1:
|
||
|
- printError(pkg, 'redundant-lsb-keyword', i)
|
||
|
+ printError(pkg, 'redundant-lsb-keyword', "'%s' in %s" % (i, f))
|
||
|
|
||
|
# TODO: where is it specified that these (or some)
|
||
|
# keywords are mandatory?
|
||
|
for i in ('Provides', 'Description', 'Short-Description'):
|
||
|
if i not in lsb_tags.keys():
|
||
|
- printError(pkg, 'missing-mandatory-lsb-keyword', "%s in %s" % (i, f))
|
||
|
+ printError(pkg, 'missing-mandatory-lsb-keyword', "'%s' in %s" % (i, f))
|
||
|
if in_lsb_tag:
|
||
|
# TODO maybe we do not have to handle this ?
|
||
|
if lastline.endswith('\\'):
|
||
|
@@ -118,7 +118,7 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||
|
cres = lsb_cont_regex.search(line)
|
||
|
if not (in_lsb_description and cres):
|
||
|
in_lsb_description = 0
|
||
|
- printError(pkg, 'malformed-line-in-lsb-comment-block', line)
|
||
|
+ printError(pkg, 'malformed-line-in-lsb-comment-block', "'%s' in %s" % (line,f))
|
||
|
else:
|
||
|
lsb_tags["Description"][-1] += " " + cres.group(1)
|
||
|
else:
|
||
|
@@ -127,7 +127,7 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||
|
tag not in ('Provides', 'Required-Start', 'Required-Stop',
|
||
|
'Should-Stop', 'Should-Start', 'Default-Stop',
|
||
|
'Default-Start', 'Description', 'Short-Description'):
|
||
|
- printError(pkg, 'unknown-lsb-keyword', line)
|
||
|
+ printError(pkg, 'unknown-lsb-keyword', "'%s' in %s" % (line, f))
|
||
|
else:
|
||
|
in_lsb_description = (tag == 'Description')
|
||
|
if not tag in lsb_tags.keys():
|
||
|
@@ -135,7 +135,6 @@ class InitScriptCheck(AbstractCheck.AbstractCheck):
|
||
|
lsb_tags[tag].append(res.group(2))
|
||
|
lastline = line
|
||
|
|
||
|
-
|
||
|
|
||
|
if status_regex.search(line):
|
||
|
status_found = 1
|