If the menu_command contain a kdesu -c "", check instead for the
command instead of kdesu. git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@199 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
14f1c54268
commit
a3798575ab
18
MenuCheck.py
18
MenuCheck.py
|
@ -92,6 +92,7 @@ class MenuCheck(AbstractCheck.AbstractCheck):
|
|||
section=re.compile("section=(\"([^\"]+)\"|([^ \t\"]+))")
|
||||
title=re.compile("title=(\"([^\"]+)\"|([^ \t\"]+))")
|
||||
command=re.compile("command=\"?([^\" ]+)")
|
||||
kdesu_command=re.compile("command=\"?kdesu -c \"?([^\" ]+)")
|
||||
icon=re.compile("icon=\"?([^\" ]+)")
|
||||
valid_sections=Config.getOption("ValidMenuSections", DEFAULT_VALID_SECTIONS)
|
||||
update_menus=re.compile("^[^#]*update-menus",re.MULTILINE)
|
||||
|
@ -174,13 +175,18 @@ class MenuCheck(AbstractCheck.AbstractCheck):
|
|||
if res:
|
||||
command=res.group(1)
|
||||
try:
|
||||
if command[0] == '/':
|
||||
files[command]
|
||||
if command[:5] == 'kdesu':
|
||||
res2=MenuCheck.kdesu_command.search(line)
|
||||
command2=res2.group(1)
|
||||
files[command2]
|
||||
else:
|
||||
if not (files.has_key("/bin/" + command) or
|
||||
files.has_key("/usr/bin/" + command) or
|
||||
files.has_key("/usr/X11R6/bin/" + command)):
|
||||
raise KeyError, command
|
||||
if command[0] == '/':
|
||||
files[command]
|
||||
else:
|
||||
if not (files.has_key("/bin/" + command) or
|
||||
files.has_key("/usr/bin/" + command) or
|
||||
files.has_key("/usr/X11R6/bin/" + command)):
|
||||
raise KeyError, command
|
||||
except KeyError:
|
||||
printWarning(pkg, "menu-command-not-in-package", command)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue