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

[SCM] Debian package checker branch, master, updated. 2.2.10-12-g3b9f019



The following commit has been merged in the master branch:
commit fff9d604788421ae797b1ad68ff84db6a0f67dcb
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Sun May 3 17:15:11 2009 +0100

    Update the reporting infrastructure to use the archive area variables.
    
    * reporting/harness:
      + [ADB] Use the new $LINTIAN_AREA variable to determine which packages
        to process.
    * reporting/html_reports:
      + [ADB] Use the new $LINTIAN_AREA variable to determine which archive
        area we are generating reports for, and pass it through to templates
        where relevant.
    * reporting/templates/index.tmpl:
      + [ADB] Modify the statistics table to refer to archive area rather
        than section.

diff --git a/debian/changelog b/debian/changelog
index f575986..592c8a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,17 @@ lintian (2.2.11) UNRELEASED; urgency=low
       variables.  In each case, the original name is permitted as a
       synonym.
 
+  * reporting/harness:
+    + [ADB] Use the new $LINTIAN_AREA variable to determine which packages
+      to process.
+  * reporting/html_reports:
+    + [ADB] Use the new $LINTIAN_AREA variable to determine which archive
+      area we are generating reports for, and pass it through to templates
+      where relevant.
+  * reporting/templates/index.tmpl:
+    + [ADB] Modify the statistics table to refer to archive area rather
+      than section.
+
   * unpack/list-{bin,src,udeb}pkg:
     + [ADB] Use the new $LINTIAN_AREA variable to determine which package
       list to read.
diff --git a/reporting/harness b/reporting/harness
index 8ed51d6..270da23 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -58,7 +58,8 @@ use vars qw($LINTIAN_ROOT $LINTIAN_LAB $LINTIAN_ARCHIVEDIR $LINTIAN_DIST
             $log_file $lintian_log $old_lintian_log
             $changes_file $list_file $html_reports_log
             $LOG_DIR $statistics_file
-            $HTML_DIR $HTML_TMP_DIR $LINTIAN_BIN_DIR $LINTIAN_GPG_CHECK);
+            $HTML_DIR $HTML_TMP_DIR $LINTIAN_BIN_DIR $LINTIAN_GPG_CHECK
+            $LINTIAN_AREA);
 
 # import perl libraries
 unshift @INC, "$LINTIAN_ROOT/lib";
@@ -86,7 +87,18 @@ $ENV{'LINTIAN_LAB'} = $LINTIAN_LAB;
 $ENV{'LINTIAN_ARCHIVEDIR'} = $LINTIAN_ARCHIVEDIR;
 $ENV{'LINTIAN_DIST'} = $LINTIAN_DIST;
 $ENV{'LINTIAN_UNPACK_LEVEL'} = $LINTIAN_UNPACK_LEVEL;
-$ENV{'LINTIAN_SECTION'} = $LINTIAN_SECTION;
+# LINTIAN_SECTION is deprecated in favour of LINTIAN_AREA
+if (defined $LINTIAN_SECTION) {
+    print STDERR "warning: LINTIAN_SECTION has been deprecated in favour of LINTIAN_AREA.\n";
+    if (defined $LINTIAN_AREA) {
+        print STDERR "Using LINTIAN_AREA as both were defined.\n";
+    } else {
+        print STDERR "Both are currently accepted, but LINTIAN_SECTION may be removed\n";
+        print STDERR "in a future Lintian release.\n";
+        $LINTIAN_AREA = $LINTIAN_SECTION;
+    }
+}
+$ENV{'LINTIAN_AREA'} = $LINTIAN_AREA;
 $ENV{'LINTIAN_ARCH'} = $LINTIAN_ARCH;
 $ENV{'PATH'} = $LINTIAN_BIN_DIR . ':' . $ENV{'PATH'};
 
diff --git a/reporting/html_reports b/reporting/html_reports
index 7c67d24..b8d4730 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -37,11 +37,16 @@ our $MAX_TAGS = 8;
 # These have no default and must be set in the configuration file.
 # FIXME: $statistics_file should be in all caps as well.
 our ($LINTIAN_ROOT, $LINTIAN_LAB, $LINTIAN_ARCHIVEDIR, $LINTIAN_DIST,
-     $LINTIAN_SECTION, $LINTIAN_ARCH, $HTML_TMP_DIR, $statistics_file);
+     $LINTIAN_SECTION, $LINTIAN_ARCH, $HTML_TMP_DIR, $statistics_file,
+     $LINTIAN_AREA);
 
 # Read the configuration.
 require './config';
 
+if (defined $LINTIAN_SECTION and not defined $LINTIAN_AREA) {
+    $LINTIAN_AREA = $LINTIAN_SECTION;
+}
+
 # The path to the mirror timestamp.
 our $LINTIAN_TIMESTAMP
     = "$LINTIAN_ARCHIVEDIR/project/trace/ftp-master.debian.org";
@@ -476,9 +481,9 @@ for my $package (sort keys %packages) {
     packages  => \%packages,
 );
 my $i = 1;
-for my $section (sort keys %list) {
-    $data{section} = $section;
-    $data{list} = $list{$section};
+for my $area (sort keys %list) {
+    $data{area} = $area;
+    $data{list} = $list{$area};
     output_template ("packages_$i.html", $templates{packages}, \%data);
     $i++;
 }
@@ -517,7 +522,7 @@ close STATS or die "cannot write to $statistics_file: $!\n";
     dist         => $LINTIAN_DIST,
     mirror       => $mirror_timestamp,
     previous     => $old_statistics->{'last-updated'},
-    section      => $LINTIAN_SECTION,
+    area         => $LINTIAN_AREA,
 );
 output_template ('index.html', $templates{index}, \%data);
 exit 0;
diff --git a/reporting/templates/index.tmpl b/reporting/templates/index.tmpl
index b3ed01a..12dc24c 100644
--- a/reporting/templates/index.tmpl
+++ b/reporting/templates/index.tmpl
@@ -47,7 +47,7 @@
       <tr><td>Last updated:</td>     <td>{$timestamp}</td></tr>
       <tr><td>Archive timestamp:</td><td>{$mirror}</td></tr>
       <tr><td>Distribution:</td>     <td>{$dist}</td></tr>
-      <tr><td>Section:</td>          <td>{$section}</td></tr>
+      <tr><td>Archive area:</td>     <td>{$area}</td></tr>
       <tr><td>Architecture:</td>     <td>{$architecture}</td></tr>
       <tr><td>Maintainers:</td>      <td>{$delta{maintainers}}</td></tr>
       <tr><td>Source packages:</td>  <td>{$delta{'source-packages'}}</td></tr>

-- 
Debian package checker


Reply to: