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

[SCM] Debian package checker branch, master, updated. 2.5.1-72-g5bc7ac8



The following commit has been merged in the master branch:
commit 5bc7ac828ff631edc84858fa7916af44dddc2197
Author: Niels Thykier <niels@thykier.net>
Date:   Mon Jul 11 21:01:25 2011 +0200

    Removed $dist argument from creating the lab/setup
    
    It relies on LINTIAN_DIST being exported anyway.  Also made the
    populate_with_dist method internal.

diff --git a/debian/changelog b/debian/changelog
index 0ddd930..460a2a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -159,6 +159,9 @@ lintian (2.5.2) UNRELEASED; urgency=low
       loaded.  Previously Lintian would only load direct
       dependencies of a collection and assume that was enough.
 
+  * lib/Lab.pm:
+    + [NT] Removed $dist argument to lab creation, since we rely on
+      LINTIAN_DIST being exported anyway.
   * lib/Lab/Package.pm:
     + [NT] Symlink in all components of the source package when
       creating the source entry in the lab.  Also removed legacy
diff --git a/frontend/lintian b/frontend/lintian
index 30cdb82..f62536a 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -790,7 +790,7 @@ $SIG{'QUIT'} = \&interrupted;
 
 # {{{ Create/Maintain Lab and add any specified Debian Archives (*.debs)
 
-$LAB = new Lab( $LINTIAN_LAB, $LINTIAN_DIST );
+$LAB = Lab->new( $LINTIAN_LAB );
 
 #######################################
 # Process -S option
diff --git a/lib/Lab.pm b/lib/Lab.pm
index 4725b1d..a81bef0 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -55,12 +55,12 @@ use File::Temp;
 my $LINTIAN_ROOT = $main::LINTIAN_ROOT;
 
 sub new {
-    my ( $class, $dir, $dist ) = @_;
+    my ( $class, $dir ) = @_;
 
     my $self = {};
     bless $self, $class;
 
-    $self->setup( $dir, $dist );
+    $self->setup( $dir );
     return $self;
 }
 
@@ -76,7 +76,7 @@ sub is_lab {
 }
 
 sub setup {
-    my ( $self, $dir, $dist ) = @_;
+    my ( $self, $dir ) = @_;
 
     if ( $dir ) {
         # Make sure we can always find it, even if we chdir around a lot.
@@ -84,7 +84,6 @@ sub setup {
         fail("Cannot determine the absolute path of $dir: $!") unless($absdir);
 	$self->{mode} = 'static';
 	$self->{dir} = $absdir;
-	$self->{dist} = $dist;
 
 	if (-d "$absdir" && ! -d "$absdir/changes") {
 	    mkdir("$absdir/changes", 0777)
@@ -101,7 +100,7 @@ sub setup {
             fail("Cannot determine the absolute path of $dir: $!")
                 unless $absdir;
 
-	    if ($self->setup_force( $dir, $dist )) {
+	    if ($self->setup_force( $dir )) {
 		$created = 1;
 		last;
 	    }
@@ -122,12 +121,12 @@ sub setup_static {
 	return 0;
     }
 
-    return $self->setup_force( $self->{dir}, $self->{dist} );
+    return $self->setup_force( $self->{dir} );
 }
 
 
 sub setup_force {
-    my ( $self, $dir, $dist ) = @_;
+    my ( $self, $dir ) = @_;
 
     return unless $dir;
 
@@ -160,18 +159,18 @@ sub setup_force {
 
     $self->{dir} = $dir;
     $ENV{'LINTIAN_LAB'} = $dir;
-    $self->populate_with_dist( $dist );
+    $self->_populate_with_dist();
 
     return 1;
 }
 
-sub populate_with_dist {
-    my ( $self, $dist ) = @_;
+sub _populate_with_dist {
+    my ( $self ) = @_;
 
-    return 0 unless $dist;
+    return 0 unless $ENV{'LINTIAN_DIST'};
     return 0 unless $self->{dir};
 
-    debug_msg(2, "spawning list-binpkg, list-udebpkg and list-srcpkg since LINTIAN_DIST=$dist");
+    debug_msg(2, "spawning list-binpkg, list-udebpkg and list-srcpkg since LINTIAN_DIST=$ENV{'LINTIAN_DIST'}");
 
     my $v = $Lintian::Output::GLOBAL->verbose ? '-v' : '';
     my %opts = ( out => $Lintian::Output::GLOBAL->stdout );

-- 
Debian package checker


Reply to: