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

lintian: r321 - trunk/reporting



Author: djpig
Date: 2004-07-04 14:12:28 +0200 (Sun, 04 Jul 2004)
New Revision: 321

Modified:
   trunk/reporting/html_reports
Log:
* fixed counting of binary packages
* some minor code improvements


Modified: trunk/reporting/html_reports
===================================================================
--- trunk/reporting/html_reports	2004-07-04 12:10:47 UTC (rev 320)
+++ trunk/reporting/html_reports	2004-07-04 12:12:28 UTC (rev 321)
@@ -33,6 +33,10 @@
             $LINTIAN_ARCH $HTML_TMP_DIR $LINTIAN_LAB
             $statistics_file);
 
+# Read_pkglists needs this
+$ENV{'LINTIAN_LAB'} = $LINTIAN_LAB;
+$ENV{'LINTIAN_ROOT'} = $LINTIAN_ROOT;
+
 # Import perl libraries
 use lib "$ENV{'LINTIAN_ROOT'}/lib";
 use Util;
@@ -74,10 +78,10 @@
 
 # process input
 while (<>) {
-    chop;
+    chomp;
     next unless /^([EWXOI]): (\S+)( \S+)?: (\S+)/;
     my ($code, $pkg, $type, $tag) = ($1, $2, $3, $4);
-    $type = "" unless (defined $type); # probably...?
+    $type = ' binary' unless (defined $type);
     my $src;
 
     if ($code eq 'E') {
@@ -131,13 +135,13 @@
     $lastpkg = $lasttag = "";
 
     warn "no maintainer for $src!\n" unless defined $source_info{$src}{maintainer};
-    set_maintainer($source_info{$src}->{'maintainer'});
-    new_src_package($src, $source_info{$src}->{'version'});
+    set_maintainer($source_info{$src}{'maintainer'});
+    new_src_package($src, $source_info{$src}{'version'});
 
     for (sort by_tag @{$by_src{$src}}) {
 	my ($code, $pkg, $type, $tag, $rest) =
 	    /^(\S): (\S+)( \S+)?: (\S+)(.*)/;
-        $type = "" unless (defined $type); # probably...?
+        $type = ' binary' unless (defined $type);
 	$rest = quotehtml($rest);
 
 	# Create a table of these for the debian-qa folks
@@ -154,7 +158,6 @@
 	if ($tag ne $lasttag or $pkg ne $lastpkg) {
 	    output_chunk(\@tags) if @tags;
 	    undef @tags;
-
 	}
 	$lastpkg = $pkg; $lasttag = $tag;
 
@@ -397,7 +400,7 @@
 }
 
 sub list_tag {
-    my ($ts, $ps);
+    my ($ts, $ps) = ( "", "" );
 
     $ts = 's' if $_[1] != 1;
     $ps = 's' if $_[2] != 1;



Reply to: