[SCM] Debian package checker branch, lab-refactor, updated. 2.5.3-174-ge39acac
The following commit has been merged in the lab-refactor branch:
commit 4f856daa2f1dd0266718ef0ff9a24f4695c50bea
Author: Niels Thykier <niels@thykier.net>
Date: Thu Oct 27 21:27:52 2011 +0200
html_reports: Use L::Lab::_get_lab_index directly
This avoids having to access the $LAB/info/source-packages behind the
back of the lab. Not to mention it saves a read + memory for having
to load an extra copy.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/lib/Lintian/Lab.pm b/lib/Lintian/Lab.pm
index f8a29cb..62d8b85 100644
--- a/lib/Lintian/Lab.pm
+++ b/lib/Lintian/Lab.pm
@@ -349,6 +349,8 @@ sub _get_lab_manifest_data {
#
# Unlike $lab->_load_lab_index, this uses the cache'd version if it is
# available.
+#
+# Note this is also used by reporting/html_reports
sub _get_lab_index {
my ($self, $pkg_type) = @_;
croak "Unknown package type $pkg_type" unless $SUPPORTED_TYPES{$pkg_type};
diff --git a/reporting/html_reports b/reporting/html_reports
index cbdd594..31e3ba8 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -52,7 +52,6 @@ $ENV{'LINTIAN_ROOT'} = $LINTIAN_ROOT;
use lib "$ENV{LINTIAN_ROOT}/lib";
use Lintian::Lab;
use Lintian::Tag::Info ();
-use Lintian::Lab::Manifest;
use Text_utils;
use Util;
@@ -104,14 +103,10 @@ for my $template (qw/head foot clean index maintainer maintainers packages tag
# ------------------------------
# Main routine
-# Read the package lists.
-#
-
my $LAB = Lintian::Lab->new ($LINTIAN_LAB);
-my $source_info = Lintian::Lab::Manifest->new ('source');
-
+my $source_info;
$LAB->open_lab;
-$source_info->read_list("$LINTIAN_LAB/info/source-packages");
+$source_info = $LAB->_get_lab_index ('source');
# Create output directories.
--
Debian package checker
Reply to: