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

[SCM] Debian package checker branch, master, updated. 2.5.10-103-g84a41ba



The following commit has been merged in the master branch:
commit 84a41babe0564734f9de732097440dd188bc18fa
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Aug 4 10:48:15 2012 +0200

    L::ProccessablePool: Remove unused variables and field
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/frontend/lintian b/frontend/lintian
index 3a2bf4e..bc7a02f 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -922,7 +922,7 @@ v_msg ("Setting up lab in $opt{'LINTIAN_LAB'} ...")
 
 # {{{ Compile list of files to process
 
-$pool = Lintian::ProcessablePool->new($LAB);
+$pool = Lintian::ProcessablePool->new;
 # process package/file arguments
 
 while (my $arg = shift) {
diff --git a/lib/Lintian/ProcessablePool.pm b/lib/Lintian/ProcessablePool.pm
index b38abc6..a0974be 100644
--- a/lib/Lintian/ProcessablePool.pm
+++ b/lib/Lintian/ProcessablePool.pm
@@ -51,17 +51,19 @@ Lintian::ProcessablePool -- Pool of processables
 
 =over 4
 
-=item Lintian::ProcessablePool->new([$lab])
+=item Lintian::ProcessablePool->new
 
 Creates a new empty pool.
 
 =cut
 
 sub new {
-    my ($class, $lab) = @_;
+    my ($class) = @_;
     my $self = {};
+    foreach my $field (qw(binary changes groups source udeb)){
+        $self->{$field} = {};
+    }
     bless $self, $class;
-    $self->_init($lab);
     return $self;
 }
 
@@ -163,7 +165,6 @@ Do not modify the list nor its contents.
 
 sub get_groups{
     my ($self) = @_;
-    my $result = [];
     my $groups = $self->{groups};
     if (scalar keys %$groups) {
         return values %$groups;
@@ -184,15 +185,6 @@ sub empty{
 
 #### Internal subs ####
 
-sub _init {
-    my ($self, $lab) = @_;
-    foreach my $field (qw(binary changes groups source udeb)){
-        $self->{$field} = {};
-    }
-    $self->{'lab'} = $lab if $lab;
-    return 1;
-}
-
 sub _add_changes_file{
     my ($self, $pkg_path) = @_;
     my $group = Lintian::ProcessableGroup->new($pkg_path);
@@ -236,7 +228,6 @@ sub _add_changes_file{
 sub _get_group_id{
     my ($self, $pkg) = @_;
     my $id = $pkg->pkg_src;
-    my $lab = $self->{'lab'};
     $id .= '_' . $pkg->pkg_src_version;
     return $id;
 }
@@ -246,7 +237,6 @@ sub _get_group_id{
 sub _get_proc_id {
     my ($self, $pkg) = @_;
     my $id = $pkg->pkg_name;
-    my $lab = $self->{'lab'};
     $id .= '_' . $pkg->pkg_version;
     $id .= '_' . $pkg->pkg_arch;
     return $id;

-- 
Debian package checker


Reply to: