Author: rra Date: 2008-01-26 02:37:23 +0100 (Sat, 26 Jan 2008) New Revision: 1147
Modified: trunk/checks/menu-format trunk/debian/changelog trunk/testset/binary/debian/hello.desktop trunk/testset/tags.binary Log: + [RA] Fix a bug that prevented Exec keys in desktop files from being checked at all. Thanks, Raphael Geissert. (Closes: #462601) + [RA] Exempt packages providing the su wrappers from the check for using su-to-root. Thanks, Raphael Geissert. Modified: trunk/checks/menu-format =================================================================== --- trunk/checks/menu-format 2008-01-22 20:05:52 UTC (rev 1146) +++ trunk/checks/menu-format 2008-01-26 01:37:23 UTC (rev 1147) @@ -420,7 +420,7 @@ # Verify all the desktop files. for my $desktop_file (@desktop_files) { - VerifyDesktopFile ($desktop_file, $desktop_file); + VerifyDesktopFile ($desktop_file, $desktop_file, $pkg); } # Now all the menu files. @@ -615,7 +615,7 @@ $section =~ s:/$::; # remove trailing slash. # Be sure the command is provided by the package. - my ($okay, $command) = VerifyCmd ($fullname, $linecount, $vals{'command'}); + my ($okay, $command) = VerifyCmd ($fullname, $linecount, $vals{'command'}, $pkg); tag "menu-command-not-in-package", "$fullname:$linecount $command" unless ($okay or not $command @@ -737,7 +737,7 @@ # Syntax-checks a .desktop file. sub VerifyDesktopFile { - my ($desktopfile, $file) = @_; + my ($desktopfile, $file, $pkg) = @_; my %vals; open (DESKTOP, '<', "unpacked/$file") or fail("cannot open desktop file $file: $!"); @@ -810,8 +810,8 @@ # # TODO: Should check quoting and the check special field # codes in Exec for desktop files. - if ($file =~ m,usr/share/applications/[^/]+$, and $vals{'Exec'} and $vals{'Exec'} =~ /\S/) { - my ($okay, $command) = VerifyCmd ($file, undef, $vals{'Exec'}); + if ($file =~ m,^/usr/share/applications/, and $vals{'Exec'} and $vals{'Exec'} =~ /\S/) { + my ($okay, $command) = VerifyCmd ($file, undef, $vals{'Exec'}, $pkg); tag "desktop-command-not-in-package", "$file $command" unless $okay or $command eq 'kcmshell'; } @@ -844,7 +844,7 @@ # false otherwise, and whose second member is the command (minus any leading # su-to-root wrapper). Shared between the desktop and menu code. sub VerifyCmd { - my ($file, $line, $exec) = @_; + my ($file, $line, $exec, $pkg) = @_; my $location = ($line ? "$file:$line" : $file); # This routine handles su wrappers. The option parsing here is ugly and @@ -881,10 +881,11 @@ $cmd = $com[0]; } else { $cmd = $wrapper; + undef $wrapper; } } tag 'su-wrapper-without--c', "$location $wrapper" unless $cmd; - if ($wrapper !~ /su-to-root/) { + if ($wrapper && $wrapper !~ /su-to-root/ && $wrapper ne $pkg) { tag 'su-wrapper-not-su-to-root', "$location $wrapper"; } } else { Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2008-01-22 20:05:52 UTC (rev 1146) +++ trunk/debian/changelog 2008-01-26 01:37:23 UTC (rev 1147) @@ -29,6 +29,10 @@ lines. Thanks, Michal Čihař. (Closes: #459871) * checks/menu-format: + [RA] Avoid a Perl warning for desktop entries without Exec. + + [RA] Fix a bug that prevented Exec keys in desktop files from being + checked at all. Thanks, Raphael Geissert. (Closes: #462601) + + [RA] Exempt packages providing the su wrappers from the check for + using su-to-root. Thanks, Raphael Geissert. * checks/menus: + [RA] Don't issue unknown-interpreter for maintainer scripts with weird interpreters. Modified: trunk/testset/binary/debian/hello.desktop =================================================================== --- trunk/testset/binary/debian/hello.desktop 2008-01-22 20:05:52 UTC (rev 1146) +++ trunk/testset/binary/debian/hello.desktop 2008-01-26 01:37:23 UTC (rev 1147) @@ -5,7 +5,7 @@ Name=Hello Name[en_US]=Hello Comment=Say hello! -Exec=hello +Exec=kdesu hello Icon=hello Terminal=true Type=Application Modified: trunk/testset/tags.binary =================================================================== --- trunk/testset/tags.binary 2008-01-22 20:05:52 UTC (rev 1146) +++ trunk/testset/tags.binary 2008-01-26 01:37:23 UTC (rev 1147) @@ -114,6 +114,7 @@ W: binary: su-to-root-with-usr-sbin /usr/lib/menu/binary:4 W: binary: su-to-root-with-usr-sbin /usr/share/menu/binary:4 W: binary: su-wrapper-not-su-to-root /usr/lib/menu/binary:3 sux +W: binary: su-wrapper-not-su-to-root /usr/share/applications/hello.desktop kdesu W: binary: su-wrapper-not-su-to-root /usr/share/menu/binary:3 sux W: binary: superfluous-clutter-in-homepage <http://lintian.debian.org/> W: binary: symlink-should-be-relative usr/share/doc/binary/html/ch3.html /usr/share/doc/binary/htm/ch1.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]