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

lintian: r37 - branches/1.22.9+tarcheck/checks



Author: jeroen
Date: 2004-02-13 15:45:51 +0100 (Fri, 13 Feb 2004)
New Revision: 37

Modified:
   branches/1.22.9+tarcheck/checks/deb-format
Log:
Broken-tar check now also works with NMU-fixed-tar generated debs. Thanks to HE (again).

Modified: branches/1.22.9+tarcheck/checks/deb-format
===================================================================
--- branches/1.22.9+tarcheck/checks/deb-format	2004-02-13 12:29:14 UTC (rev 36)
+++ branches/1.22.9+tarcheck/checks/deb-format	2004-02-13 14:45:51 UTC (rev 37)
@@ -31,7 +31,7 @@
 
 open INPUT, "ar p deb data.tar.gz | gzip -dc |";
 
-my ($chunk, $real_name, $data);
+my ($chunk, $real_name, $data, $oldraw, $raw);
 while( read( INPUT, $chunk, HEAD ) ) {                  
     ### if we can't read in all bytes... ###
     last if length $chunk != HEAD;
@@ -69,8 +69,10 @@
         ### throw away trailing garbage ###
         substr ($$data, $entry->size) = "";
     }
-    
-    
+
+    $oldraw = $raw;
+    $raw = $entry->raw();
+
     ### clean up of the entries.. posix tar /apparently/ has some
     ### weird 'feature' that allows for filenames > 255 characters
     ### they'll put a header in with as name '././@LongLink' and the
@@ -87,12 +89,12 @@
         undef $real_name;
     }
 
-	my $raw = $entry->raw();
 	my $name = substr($raw, 0, 100);
 	$name =~ s/\x00/-/g;
 
 	print "E: $pkg $type: deb-created-with-broken-tar broken file: /$name\n"
-		if ((length($name) == 100) && ($name eq $entry->name()));
+		if ((length($name) == 100) && ($name eq $entry->name()) &&
+			substr($oldraw, 0, 13) ne '././@LongLink');
     
     ### Guard against tarfiles with garbage at the end
     last if $entry->name eq ''; 



Reply to: