Bug#367466: lintian: enhancement, check for missing menu files
Package: lintian Version: 1.23.21 Severity: wishlist I have an idea for a lintian enhancement. There are packages that provide GUI programs (gtk,qt,etc.) that do not provide a menu file for those programs, ideally they would all provide menu files. Here is a patch that adds a test to the binaries check. It checks each executable binary to see if it uses libX11 and if any do and the package doesn't have a menu file it issues a warning. I have tested it on 1) a deb that has no menu file and a libX11 using executable and it correctly reports it. 2) a deb that has no menu file and libX11 using _libraries_ (libxt package) and it correctly does not report. 3) a deb that had a menu file and a libX11 using executable and it correctly does not report. Can you think of any other cases where this test would mistakenly fail? This is my first lintian patch, so let me know if I haven't done things correctly. Thanks, -- Matt Taggart [EMAIL PROTECTED] diff -ur lintian-1.23.21/checks/binaries lintian-1.23.21.new/checks/binaries --- lintian-1.23.21/checks/binaries 2006-04-02 17:40:48.0 -0500 +++ lintian-1.23.21.new/checks/binaries 2006-05-16 01:57:38.0 -0500 @@ -31,6 +31,8 @@ my $arch; my $dynsyms = 0; my $needs_depends_line = 0; +my $has_x11 = 0; +my $has_menu = 0; my %COMMENT; my %NOTE; @@ -166,6 +168,11 @@ m/^(.+?):\s+(.*)$/o or fail(an error in the file pkg is preventing lintian from checking this package: $_); my ($file,$info) = ($1,$2); +# check for menu file +if ($file =~ m,/usr/(lib|share)/menu/,) { + $has_menu++; +} + # binary or object file? next unless ($info =~ m/^[^,]*\bELF\b/) or ($info =~ m/\bcurrent ar archive\b/); @@ -268,6 +275,10 @@ if ($lib =~ m/^libc/o) { $no_libc = 0; } + # count executables that use X11 + if ( $info =~ m/executable/ and $lib =~ m/^libX11/o) { + $has_x11++; + } } if ($no_libc and not $file =~ m,/libc\b,) { @@ -281,6 +292,11 @@ } close(IN); +# did a binary use X11 and we don't have a menu file? +if ($has_x11 and !$has_menu) { + tag binary-uses-x11-no-menu, ; +} + if ($needs_depends_line) { if (not -e fields/depends and not -e fields/pre-depends) { tag missing-depends-line, diff -ur lintian-1.23.21/checks/binaries.desc lintian-1.23.21.new/checks/binaries.desc --- lintian-1.23.21/checks/binaries.desc2006-03-11 21:33:35.0 -0600 +++ lintian-1.23.21.new/checks/binaries.desc2006-05-16 01:49:24.0 -0500 @@ -145,3 +145,11 @@ Info: This appears to be an ELF file but objdump -T cannot parse it. If it is external debugging symbols for another file, it should be installed under /usr/lib/debug. + +Tag: binary-uses-x11-no-menu +Type: warning +Info: This package contains an executable linked against libX11, but does + not appear to have a menu file. This is a very basic test, if a package + does not have a menu file any executable that requires libX11 will cause + this warning. Please inspect your executables and determine if a menu + file is needed.
Processed: tagging 367466
Processing commands for [EMAIL PROTECTED]: # Automatically generated email from bts, devscripts version 2.9.19 tags 367466 patch Bug#367466: lintian: enhancement, check for missing menu files There were no tags set. Tags added: patch End of message, stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#367534: lintian: stray-translated-debconf-templates false positives
Package: lintian Version: 1.23.21 Severity: minor Tags: patch Hi, Following of #232442: Packages containing a *templates.in file will have the stray-translated-debconf-templates tag (console-common, dash, norwegian and sun-java5 have such files). I have checked the archive, and it seems to be the one used pattern that may raise a warning (i.e. there is no other templates.XX that have the same problem). The attached patch should fix the problem. -- Thomas Huriaux --- po-debconf.orig 2006-05-16 20:03:20.0 +0200 +++ po-debconf 2006-05-16 20:08:23.0 +0200 @@ -56,7 +56,7 @@ # If we got here, we're using po-debconf, so there shouldn't be any stray # language templates left over from debconf-mergetemplate. for (@lang_templates) { -tag stray-translated-debconf-templates, $_; +tag stray-translated-debconf-templates, $_ unless ($_ =~ /templates\.in$/); } # yada builds its template and po/POTFILES.in dynamically at build time, so signature.asc Description: Digital signature
lintian: r674 - trunk/debian
Author: rra Date: 2006-05-17 04:06:08 +0200 (Wed, 17 May 2006) New Revision: 674 Modified: trunk/debian/changelog Log: Move change log message under the relevant file. Modified: trunk/debian/changelog === --- trunk/debian/changelog 2006-05-13 22:35:23 UTC (rev 673) +++ trunk/debian/changelog 2006-05-17 02:06:08 UTC (rev 674) @@ -1,7 +1,8 @@ lintian (1.23.22) UNRELEASED; urgency=low - * [JvW] Teach lintian to know about the 'error' debconf template question -type + * checks/debconf: ++ [JvW] Teach lintian to know about the 'error' debconf template + question type -- Jeroen van Wolffelaar [EMAIL PROTECTED] Sun, 14 May 2006 00:32:48 +0200 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
lintian: r675 - in trunk: checks debian testset/debconf/debian
Author: rra Date: 2006-05-17 04:09:04 +0200 (Wed, 17 May 2006) New Revision: 675 Added: trunk/testset/debconf/debian/debconf-test.templates.in Modified: trunk/checks/po-debconf trunk/debian/changelog Log: * checks/po-debconf: + [RA] Don't consider templates.in to be a stray translated template file. Thanks, Thomas Huriaux. (Closes: #367534) Modified: trunk/checks/po-debconf === --- trunk/checks/po-debconf 2006-05-17 02:06:08 UTC (rev 674) +++ trunk/checks/po-debconf 2006-05-17 02:09:04 UTC (rev 675) @@ -56,7 +56,7 @@ # If we got here, we're using po-debconf, so there shouldn't be any stray # language templates left over from debconf-mergetemplate. for (@lang_templates) { -tag stray-translated-debconf-templates, $_; +tag stray-translated-debconf-templates, $_ unless /templates\.in$/; } # yada builds its template and po/POTFILES.in dynamically at build time, so Modified: trunk/debian/changelog === --- trunk/debian/changelog 2006-05-17 02:06:08 UTC (rev 674) +++ trunk/debian/changelog 2006-05-17 02:09:04 UTC (rev 675) @@ -3,8 +3,11 @@ * checks/debconf: + [JvW] Teach lintian to know about the 'error' debconf template question type + * checks/po-debconf: ++ [RA] Don't consider templates.in to be a stray translated template + file. Thanks, Thomas Huriaux. (Closes: #367534) - -- Jeroen van Wolffelaar [EMAIL PROTECTED] Sun, 14 May 2006 00:32:48 +0200 + -- Russ Allbery [EMAIL PROTECTED] Tue, 16 May 2006 19:06:58 -0700 lintian (1.23.21) unstable; urgency=low Added: trunk/testset/debconf/debian/debconf-test.templates.in === -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#367466: lintian: enhancement, check for missing menu files
Matt Taggart [EMAIL PROTECTED] writes: Package: lintian Version: 1.23.21 Severity: wishlist I have an idea for a lintian enhancement. There are packages that provide GUI programs (gtk,qt,etc.) that do not provide a menu file for those programs, ideally they would all provide menu files. Here is a patch that adds a test to the binaries check. It checks each executable binary to see if it uses libX11 and if any do and the package doesn't have a menu file it issues a warning. I have tested it on I'm worried about the number of false positives here, from packages like gksu that might link with X libraries but shouldn't have menu entries for themselves. There may be quite a few helper programs like that that link with X but aren't applications in the menu sense. (There are also a lot of false negatives, of course, including binaries that link with a toolkit rather than with the X libraries directly, but that doesn't necessarily rule it out.) -- Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Processed: Lintian bugs fixed in revision r675
Processing commands for [EMAIL PROTECTED]: package lintian Ignoring bugs not assigned to: lintian # Fixed in r675 by rra tag 367534 + pending Bug#367534: lintian: stray-translated-debconf-templates false positives Tags were: patch Tags added: pending thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]