[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#367466: marked as done ([checks/files] check for missing menu files)



Your message dated Sat, 26 Dec 2015 23:18:19 +0000
with message-id <567F203B.2000303@thykier.net>
and subject line Re: lintian: enhancement, check for missing menu files
has caused the Debian Bug report #367466,
regarding [checks/files] check for missing menu files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
367466: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367466
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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
taggart@debian.org

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.000000000 -0500
+++ lintian-1.23.21.new/checks/binaries	2006-05-16 01:57:38.000000000 -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.desc	2006-03-11 21:33:35.000000000 -0600
+++ lintian-1.23.21.new/checks/binaries.desc	2006-05-16 01:49:24.000000000 -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.

--- End Message ---
--- Begin Message ---
On Tue, 16 May 2006 00:08:39 -0700 Matt Taggart <taggart@debian.org> wrote:
> 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
> taggart@debian.org
> 

With the tech-ctte deprecating the menu files in general, this bug is no
longer relevant.

Thanks,
~Niels


Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply to: