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

lintian: r1025 - in trunk: checks debian testset testset/filenames/debian



Author: rra
Date: 2007-12-04 04:47:05 +0100 (Tue, 04 Dec 2007)
New Revision: 1025

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/debian/changelog
   trunk/testset/filenames/debian/rules
   trunk/testset/tags.filenames
   trunk/testset/tags.libbaz
   trunk/testset/tags.manpages
Log:
  + [HE,RA] Add 'package-contains-empty-directory' check, but ignore
    dirs in /var and /etc and handle /usr/lib/perl5 and /usr/share/perl5
    directories separately with a lower priority level since they're
    very common.  (Closes: #452316, #357838)

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/checks/files	2007-12-04 03:47:05 UTC (rev 1025)
@@ -830,12 +830,23 @@
     tag "package-section-games-but-has-usr-bin";
 }
 
+# Warn about empty directories, but ignore empty directories in /var (packages
+# create directories to hold dynamically created data) or /etc (configuration
+# files generated by maintainer scripts).  Also skip base-files, which is a
+# very special case.
+#
+# Empty Perl directories are so common that we give them a different tag at a
+# lower severity level.
 foreach my $dir (keys %dir_counts) {
     next if $dir eq "";
-    next if $dir eq "./usr/lib/perl5"; #this is so common we want to skip it for now
-    next if $dir =~ m{/var/}; #packages often create dirs to hold dynamically created data
+    next if ($dir =~ m{^var/} or $dir =~ m{^etc/});
+    next if $pkg eq 'base-files';
     if ($dir_counts{$dir} == 0) {
-	tag "package-contains-empty-directory", $dir;
+	if ($dir eq 'usr/lib/perl5/' or $dir eq 'usr/share/perl5/') {
+	    tag "package-contains-empty-perl-directory", $dir;
+	} else {
+	    tag "package-contains-empty-directory", $dir;
+	}
     }
 }
 

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/checks/files.desc	2007-12-04 03:47:05 UTC (rev 1025)
@@ -695,6 +695,15 @@
 Info: This package installs an empty directory.  This might be intentional
  but it's normally a mistake.  If it is intentional, add a lintian override.
 
+Tag: package-contains-empty-perl-directory
+Type: info
+Info: This package installs an empty /usr/lib/perl5 or /usr/share/perl5
+ directory.  This is an artifact of ExtUtils::MakeMaker and isn't harmful,
+ but it's messy.  It's preferrable to remove the directory the package
+ doesn't use (/usr/share/perl5 for binary Perl modules and /usr/lib/perl5
+ for pure Perl modules) in <tt>debian/rules</tt> after running make
+ install.
+
 Tag: package-section-games-but-contains-no-game
 Type: error
 Ref: policy 11.11

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/debian/changelog	2007-12-04 03:47:05 UTC (rev 1025)
@@ -33,8 +33,10 @@
     + [HE] Check for Section field in source packages, for which it
            is mandatory. Joerg Jaspert made me do this.
   * checks/files:
-    + [HE] Add 'package-contains-empty-directory' check, but
-           ignore dirs in /var/* and /usr/lib/perl5/. (Closes: #452316)
+    + [HE,RA] Add 'package-contains-empty-directory' check, but ignore
+      dirs in /var and /etc and handle /usr/lib/perl5 and /usr/share/perl5
+      directories separately with a lower priority level since they're
+      very common.  (Closes: #452316, #357838)
     + [HE] Add checks for game packages that contain no game executables
            (package-section-games-but-contains-no-game) or that contain
            anything in usr/bin at all, which is usually a mistake.

Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/testset/filenames/debian/rules	2007-12-04 03:47:05 UTC (rev 1025)
@@ -52,6 +52,7 @@
 	mkdir "debian/tmp/usr/lib/perl5/{arch}"
 	mkdir debian/tmp/usr/lib/perl5/.arch-ids
 	mkdir debian/tmp/usr/lib/perl5/.bzr
+	install -d debian/tmp/usr/share/perl5
 
 	touch debian/tmp/usr/lib/perl5/foo/.packlist
 	chmod 644 debian/tmp/usr/lib/perl5/foo/.packlist

Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/testset/tags.filenames	2007-12-04 03:47:05 UTC (rev 1025)
@@ -33,6 +33,7 @@
 I: filenames source: no-section-field-for-source
 I: filenames: file-in-usr-something-x11-without-pre-depends usr/include/X11/
 I: filenames: no-md5sums-control-file
+I: filenames: package-contains-empty-perl-directory usr/share/perl5/
 I: more-filename-games: no-md5sums-control-file
 W: filename-games: binary-without-manpage usr/bin/test-game
 W: filename-games: no-priority-field

Modified: trunk/testset/tags.libbaz
===================================================================
--- trunk/testset/tags.libbaz	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/testset/tags.libbaz	2007-12-04 03:47:05 UTC (rev 1025)
@@ -28,6 +28,7 @@
 W: libbaz source: package-uses-deprecated-debhelper-compat-version 1
 W: libbaz source: source-nmu-has-incorrect-version-number 1
 W: libbaz source: substvar-source-version-is-deprecated libbaz2-dev
+W: libbaz1-dev: package-contains-empty-directory usr/include/
 W: libbaz1: missing-depends-line
 W: libbaz1: package-name-doesnt-match-sonames libbaz2-1.0 libbaz3-1
 W: libbaz1: postinst-should-not-set-usr-doc-link

Modified: trunk/testset/tags.manpages
===================================================================
--- trunk/testset/tags.manpages	2007-12-04 03:46:50 UTC (rev 1024)
+++ trunk/testset/tags.manpages	2007-12-04 03:47:05 UTC (rev 1025)
@@ -57,3 +57,4 @@
 W: manpages: manpage-has-bad-whatis-entry usr/share/man/man6/usr-games-binary.6.gz
 W: manpages: manpage-has-errors-from-man usr/share/man/man1/test-latin1-chars.1p.gz 9: warning: can't find numbered character 228
 W: manpages: manpage-has-useless-whatis-entry usr/share/man/man1/true.1.gz
+W: manpages: package-contains-empty-directory usr/share/man/man1/not-a-man-page.1.gz/



Reply to: