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

[SCM] Debian package checker branch, master, updated. 2.2.12-29-ga813c87



The following commit has been merged in the master branch:
commit a813c8706de4531eb91aaef8bdcc9f55cf105abb
Author: Russ Allbery <rra@debian.org>
Date:   Sat Jul 4 21:32:34 2009 -0700

    Check for info dir files in packages
    
    * checks/files{,.desc}:
      + [RA] Check for /usr/share/info/dir files included in the package.
        Thanks, Bas Zoetekouw.  (Closes: #535566)
    * checks/infofiles:
      + [RA] Ignore dir files; they're a different error that's now caught
        by checks/files.

diff --git a/checks/files b/checks/files
index 678e0ef..d95441b 100644
--- a/checks/files
+++ b/checks/files
@@ -441,6 +441,9 @@ foreach my $file (sort keys %{$info->index}) {
 	    if ($type eq 'udeb') {
 		tag "documentation-file", "$file";
 	    }
+	    if ($file =~ m,^usr/share/info/dir(?:\.old)?(?:\.gz)?$,) {
+		tag 'package-contains-info-dir-file', $file;
+	    }
 	}
 	# ---------------- /usr/share/linda/overrides
 	elsif ($file =~ m,^usr/share/linda/overrides/\S+,) {
diff --git a/checks/files.desc b/checks/files.desc
index 2592ca2..7646f53 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1031,3 +1031,14 @@ Info: This package contains both bitmapped fonts for a specific DPI
  (100dpi or 75dpi) and misc bitmapped fonts.  These should not be combined
  in the same package.  Instead, the misc bitmapped fonts should be
  provided in a separate package with <tt>-misc</tt> appended to its name.
+
+Tag: package-contains-info-dir-file
+Severity: important
+Certainty: certain
+Info: This package contains a file named <tt>dir</tt> or <tt>dir.old</tt>,
+ possibly compressed, in <tt>/usr/share/info</tt>.  This is the directory
+ (or backup) of info pages and is generated automatically by install-info
+ when a package containing info documentation is installed.  Some upstream
+ build systems create it automatically, but it must not be included in a
+ package since it needs to be generated dynamically based on the installed
+ info files on the system.
diff --git a/checks/infofiles b/checks/infofiles
index 249b796..eef9119 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -27,7 +27,7 @@ use common_data;
 
 use Tags;
 use Util;
-use File::Basename;
+use File::Basename qw(fileparse);
 
 sub run {
 
@@ -53,11 +53,15 @@ foreach my $file (sort keys %{$info->index}) {
     my $index_info = $info->index->{$file};
     my $file_info = $info->file_info->{$file};
     my $link = $index_info->{link} || '';
-    my ($fname, $path, $suffix) = fileparse($file);
+    my ($fname, $path) = fileparse($file);
 
     next unless ($index_info->{type} =~ m,^[\-lh],o)
 	    and ($path =~ m,^usr/share/info/, or $path =~ m,^usr/info/,);
 
+    # Ignore dir files.  That's a different error which we already catch in
+    # the files check.
+    next if $fname =~ /^dir(?:\.old)?(?:\.gz)?/;
+
     # Analyze the file names making sure the documents are named properly.
     # Note that Emacs 22 added support for images in info files, so we have to
     # accept those and ignore them.  Just ignore .png files for now.
diff --git a/debian/changelog b/debian/changelog
index 2bda222..3dcda0c 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 lintian (2.2.13) UNRELEASED; urgency=low
 
   * Summary of tag changes:
+    + Added:
+      - package-contains-info-dir-file
     + Removed:
       - missing-comma-after-substvar
 
@@ -25,6 +27,11 @@ lintian (2.2.13) UNRELEASED; urgency=low
     + [RA] Allow non-core Python packages to install files into
       /usr/lib/python*/dist-packages, the extension location for Python
       2.6 and later.  Thanks, Julian Andres Klode.  (Closes: #534212)
+    + [RA] Check for /usr/share/info/dir files included in the package.
+      Thanks, Bas Zoetekouw.  (Closes: #535566)
+  * checks/infofiles:
+    + [RA] Ignore dir files; they're a different error that's now caught
+      by checks/files.
   * checks/init.d:
     + [RA] Take into account dangling symlinks in /etc/init.d.  Patch from
       Raphael Geissert.  (Closes: #534139)
diff --git a/t/tests/files-general/debian/debian/install b/t/tests/files-general/debian/debian/install
index 37f6343..aa0e69e 100644
--- a/t/tests/files-general/debian/debian/install
+++ b/t/tests/files-general/debian/debian/install
@@ -2,3 +2,4 @@ lintian-16x16.png usr/share/apps/lintian/icons/hicolor/22x22
 lintian-22x22.png usr/share/apps/lintian/icons/hicolor/22x22
 --lzma etc/modprobe.d
 lintian.conf etc/modprobe.d
+dir usr/share/info
diff --git a/t/tests/files-general/debian/dir b/t/tests/files-general/debian/dir
new file mode 100644
index 0000000..e465d26
--- /dev/null
+++ b/t/tests/files-general/debian/dir
@@ -0,0 +1,18 @@
+This is the file .../info/dir, which contains the
+topmost node of the Info hierarchy, called (dir)Top.
+The first time you invoke Info you start off looking at this node.
+
+File: dir,	Node: Top	This is the top of the INFO tree
+
+  This (the Directory node) gives a menu of major topics.
+  Typing "q" exits, "?" lists all Info commands, "d" returns here,
+  "h" gives a primer for first-timers,
+  "mEmacs<Return>" visits the Emacs manual, etc.
+
+  In Emacs, you can click mouse button 2 on a menu item or cross reference
+  to select it.
+
+* Menu:
+
+Archiving
+* Cpio: (cpio).                 Copy-in-copy-out archiver to tape or disk.
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index 4539d78..4cfcdfa 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -7,3 +7,4 @@ Test-For:
  dir-or-file-in-var-run
  icon-size-and-directory-name-mismatch
  non-conf-file-in-modprobe.d
+ package-contains-info-dir-file
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index d72c75b..ed208cc 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -1,4 +1,5 @@
 E: files-general: dir-or-file-in-var-lock var/lock/lintian/
 E: files-general: dir-or-file-in-var-run var/run/lintian/
 E: files-general: non-conf-file-in-modprobe.d etc/modprobe.d/--lzma
+E: files-general: package-contains-info-dir-file usr/share/info/dir.gz
 W: files-general: icon-size-and-directory-name-mismatch usr/share/apps/lintian/icons/hicolor/22x22/lintian-16x16.png 16x16

-- 
Debian package checker


Reply to: