lintian: r254 - in trunk: checks debian testset/binary/debian
Author: djpig
Date: 2004-05-04 03:14:57 +0200 (Tue, 04 May 2004)
New Revision: 254
Modified:
trunk/checks/menu-format
trunk/checks/menu-format.desc
trunk/debian/changelog
trunk/testset/binary/debian/menu
Log:
Allow a comma separated list in the package test. Pointed
out by Gerfried Fuchs (Closes: #246507) Change incorrect-package-test
to pkg-not-in-package-test which is issued when the package is
not in the list. Don't issue menu-command-not-in-package when
we have a list.
Modified: trunk/checks/menu-format
===================================================================
--- trunk/checks/menu-format 2004-05-04 00:37:38 UTC (rev 253)
+++ trunk/checks/menu-format 2004-05-04 01:14:57 UTC (rev 254)
@@ -207,8 +207,11 @@
tag "bad-test-in-menu-item", "/usr/lib/menu/$menufile:$linecount";
return;
}
- if ($1 ne $pkg) {
- tag "incorrect-package-test", "$1 /usr/lib/menu/$menufile";
+ my $pkg_test = $1;
+ my %tested_packages = map { $_ => 1 } split( /\s*,\s*/, $pkg_test);
+ my $tested_packages = scalar keys %tested_packages;
+ unless (exists $tested_packages{$pkg}) {
+ tag "pkg-not-in-package-test", "$pkg_test /usr/lib/menu/$menufile";
}
$line =~ s/^\?package\(.*?\)://;
@@ -342,11 +345,12 @@
tag "su-to-root-without--c", "/usr/lib/menu/$menufile:$linecount";
} else {
tag "menu-command-not-in-package", "/usr/lib/menu/$menufile:$linecount"
- if (!$file_index{".$cmd"});
+ if (!$file_index{".$cmd"} && ($tested_packages < 2));
}
} else {
tag "menu-command-not-in-package", "/usr/lib/menu/$menufile:$linecount $com[0]"
- if ($com[0] && !$file_index{".$com[0]"});
+ if ($com[0] && !$file_index{".$com[0]"}
+ && ($tested_packages < 2));
}
if (exists($vals{'icon'})) {
Modified: trunk/checks/menu-format.desc
===================================================================
--- trunk/checks/menu-format.desc 2004-05-04 00:37:38 UTC (rev 253)
+++ trunk/checks/menu-format.desc 2004-05-04 01:14:57 UTC (rev 254)
@@ -31,10 +31,10 @@
Info: An item of the menu file cannot be parsed as a series of tag=value
pairs. This could be because you didn't close a set of double quotes.
-Tag: incorrect-package-test
+Tag: pkg-not-in-package-test
Type: warning
-Info: The menu item tests to see if a package other than the package that
- contains it is installed. This is probably an error. Perhaps it is spelled
+Info: The menu item doesn't tests to see if the package that contains it
+ is installed. This is probably an error. Perhaps it is spelled
or capitalized wrong, or perhaps the menu file was copied from some other
package and this was accidentally not changed.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-05-04 00:37:38 UTC (rev 253)
+++ trunk/debian/changelog 2004-05-04 01:14:57 UTC (rev 254)
@@ -13,6 +13,11 @@
* checks/menu-format:
+ [FL] Fix su-to-root checks to cope with the new -X option and
improve the option parsing to better handle unknown options
+ + [FL] Allow a comma separated list in the package test. Pointed
+ out by Gerfried Fuchs (Closes: #246507) Change incorrect-package-test
+ to pkg-not-in-package-test which is issued when the package is
+ not in the list. Don't issue menu-command-not-in-package when
+ we have a list.
* checks/shared-libs:
+ [FL] Don't report shlib-with-executable-bit and
shlib-with-bad-permissions on symbolic links to such files
Modified: trunk/testset/binary/debian/menu
===================================================================
--- trunk/testset/binary/debian/menu 2004-05-04 00:37:38 UTC (rev 253)
+++ trunk/testset/binary/debian/menu 2004-05-04 01:14:57 UTC (rev 254)
@@ -4,3 +4,4 @@
?package(binary):needs="x11" section="WindowManagers" title="Run xfdisk" command="su-to-root -c xfdisk"
?package(binary):needs="wm" section="Apps/System" title="Run fdisk-wm" command="/usr/bin/su-to-root cfdisk"
?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere"
+?package(binary,other-binary):needs="text" section="Apps/System" title="more than one required" command="other-bin -s omething"
Reply to: