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

lintian: r967 - in trunk: checks debian testset/binary/debian testset/filenames/debian



Author: rra
Date: 2007-10-15 05:31:43 +0200 (Mon, 15 Oct 2007)
New Revision: 967

Modified:
   trunk/checks/files
   trunk/checks/menus
   trunk/debian/changelog
   trunk/testset/binary/debian/doc-base
   trunk/testset/binary/debian/rules
   trunk/testset/filenames/debian/rules
Log:
  + [RA] Don't think hard links are zero-length files.
* checks/menus:
  + [RA] Find the targets of hard links correctly.  (Closes: #444355)

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/checks/files	2007-10-15 03:31:43 UTC (rev 967)
@@ -36,6 +36,7 @@
 my $has_binary_perl_file;
 my @nonbinary_perl_files_in_lib;
 
+my %is_hard_link;
 my %linked_against_libvga;
 my %script = ();
 
@@ -86,6 +87,7 @@
     $file =~ s,^\./,,;
 
     if ($file =~ s/ link to (.*)//) {
+        $is_hard_link{$file} = 1;
 	my $link_target = $1;
 	$link_target =~ s,^\./,,;
 	my $link_target_dir = $link_target;
@@ -195,7 +197,7 @@
 		}
 
 		# zero byte file in /usr/share/doc/
-		if ($size == 0 and $perm =~ m,^-,) {
+		if ($size == 0 and $perm =~ m,^-, and not $is_hard_link{$file}) {
 		    # exception: __init__.py files are empty tagging files (see
 		    # bug #215234)
 		    unless ($file =~ m,^usr/share/doc/([^/]+/)?examples/(.+/)?__init__\.py$,) {

Modified: trunk/checks/menus
===================================================================
--- trunk/checks/menus	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/checks/menus	2007-10-15 03:31:43 UTC (rev 967)
@@ -292,12 +292,15 @@
 
     $file = "/" . $file if (not $file =~ m%^/%); # make file absolute
     $file =~ s%/+%/%g;				 # remove duplicated `/'
-    ($file, $link) = split(/ -> /, $file);
+    my $ishard = ($file =~ / link to /);
+    ($file, $link) = split(/ (?:->|link to) /, $file);
 
     $all_files{$file} = 1;
 
     if (defined $link) {
-	if (not $link =~ m,^/,) {		  # not absolute link
+	if ($ishard) {
+	    $link =~ s,^\./,/,;
+	} elsif (not $link =~ m,^/,) {		  # not absolute link
 	    $link = "/" . $link;		  # make sure link starts with '/'
 	    $link =~ s,/+\./+,/,g;		  # remove all /./ parts
 	    my $dcount = 1;

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/debian/changelog	2007-10-15 03:31:43 UTC (rev 967)
@@ -37,6 +37,7 @@
       folder attributes.  Thanks, Paul Wise.  (Closes: #438203)
     + [RA] Improve the recommended command to remove .packlist files.
       Thanks, Justin Pryzby.
+    + [RA] Don't think hard links are zero-length files.
   * checks/infofiles:
     + [RA] Emacs 22 now allows embedded images in info files, so accept
       and ignore PNG files in the info directory.  More image types may be
@@ -47,6 +48,8 @@
       Thanks, Michael Biebl.  (Closes: #442709)
     + [RA] Ignore categories beginning with "X-", reserved for category
       extensions.  Thanks, Josselin Mouette.  (Closes: #443827)
+  * checks/menus:
+    + [RA] Find the targets of hard links correctly.  (Closes: #444355)
   * checks/nmu.desc:
     + [RA] Remove obsolete note about binary NMUs.  Patch from Thijs
       Kinkhorst.  (Closes: #437925)
@@ -61,7 +64,7 @@
   * collection/changelog-file{.desc,}:
     + [RA] Collect NEWS.Debian as well as changelog.
 
- -- Russ Allbery <rra@debian.org>  Sun, 14 Oct 2007 19:41:13 -0700
+ -- Russ Allbery <rra@debian.org>  Sun, 14 Oct 2007 20:29:58 -0700
 
 lintian (1.23.34) unstable; urgency=low
 

Modified: trunk/testset/binary/debian/doc-base
===================================================================
--- trunk/testset/binary/debian/doc-base	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/testset/binary/debian/doc-base	2007-10-15 03:31:43 UTC (rev 967)
@@ -29,4 +29,9 @@
 Format: inFO
 Files: /usr/share/info/binary.info.gz
 
+Format: HTML
+Index: /usr/share/doc/binary/html/index.html
+Files: /usr/share/doc/binary/html/ch5.html
+       /usr/share/doc/binary/html/ch6.html
 
+

Modified: trunk/testset/binary/debian/rules
===================================================================
--- trunk/testset/binary/debian/rules	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/testset/binary/debian/rules	2007-10-15 03:31:43 UTC (rev 967)
@@ -33,6 +33,9 @@
 	echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/ch1.html
 	ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html
 	ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html
+	echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/ch5.html
+	ln $(tmp)/usr/share/doc/binary/html/ch5.html \
+	    $(tmp)/usr/share/doc/binary/html/ch6.html
 	install -d $(tmp)/usr/share/menu
 	install -d $(tmp)/usr/lib/menu
 	install -d $(tmp)/usr/share/binary

Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules	2007-10-15 02:44:24 UTC (rev 966)
+++ trunk/testset/filenames/debian/rules	2007-10-15 03:31:43 UTC (rev 967)
@@ -87,6 +87,10 @@
 	gzip debian/tmp/usr/share/doc/filenames/news.debian
 	touch debian/tmp/usr/share/doc/filenames/NEWS.Debian
 
+	echo foo > debian/tmp/usr/share/doc/filenames/link-one
+	ln debian/tmp/usr/share/doc/filenames/link-one \
+	    debian/tmp/usr/share/doc/filenames/link-two
+
 	install -d debian/tmp/usr/share/doc/filenames/examples
 	touch debian/tmp/usr/share/doc/filenames/examples/__init__.py
 	touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example



Reply to: