[dh-make-perl] 02/02: Replaced all 'start_dir' uses with 'main_dir'

Dima Kogan dkogan-guest at alioth.debian.org
Thu Oct 31 17:58:48 UTC 2013


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch master
in repository dh-make-perl.

commit 4fdae0a0f3a3efa4b2ee4954a792f14c6c3dec86
Author: Dima Kogan <dima at secretsauce.net>
Date:   Wed Oct 30 22:18:33 2013 -0700

    Replaced all 'start_dir' uses with 'main_dir'
    
    start_dir is the pwd when we run dh_make_perl;
    main_dir is the (directory given on the cmdline) || '.'
    
    We never actually want to use the start_dir. Prior to this patch
    
     dh-make-perl /some/path/
    
    would look for a source tarball in '.', which is clearly wrong for that command.
---
 lib/DhMakePerl/Command/Packaging.pm |    3 +--
 lib/DhMakePerl/Command/make.pm      |    7 +++----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 7f544e0..5f5660b 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -16,7 +16,7 @@ DhMakePerl::Command::Packaging - common routines for 'make' and 'refresh' dh-mak
 use base 'DhMakePerl';
 
 __PACKAGE__->mk_accessors(
-    qw( start_dir main_dir debian_dir
+    qw( main_dir debian_dir
         mod_cpan_version
         meta perlname author
         version rules docs examples copyright
@@ -45,7 +45,6 @@ use User::pwent;
 use constant debstdversion => '3.9.5';
 
 our %DEFAULTS = (
-    start_dir => getcwd(),
 );
 
 sub new {
diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
index 29bf00e..433c985 100644
--- a/lib/DhMakePerl/Command/make.pm
+++ b/lib/DhMakePerl/Command/make.pm
@@ -10,7 +10,6 @@ use base 'DhMakePerl::Command::Packaging';
 __PACKAGE__->mk_accessors(
     qw(
         cfg apt_contents main_dir debian_dir meta
-        start_dir
         perlname version pkgversion
         copyright author
         extrasfields  extrapfields
@@ -367,8 +366,8 @@ sub setup_dir {
         my $maindir = shift(@ARGV) || '.';
         $maindir =~ s/\/$//;
         $self->main_dir($maindir);
-        my $guessed_tarball = catfile( $self->start_dir, "..",
-            basename( $self->start_dir ) . ".tar.gz" );
+        my $guessed_tarball = catfile( $self->main_dir, "..",
+            basename( $self->main_dir ) . ".tar.gz" );
 
         print "Trying $guessed_tarball...";
         if ( -f $guessed_tarball ) {
@@ -424,7 +423,7 @@ sub install_package {
     $debname = sprintf( "%s_%s-1_%s.deb", $self->pkgname, $self->version,
         $archspec );
 
-    my $deb = $self->start_dir . "/$debname";
+    my $deb = $self->main_dir . "/$debname";
     system("dpkg -i $deb") == 0
         || die "Cannot install package $deb\n";
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



More information about the Pkg-perl-cvs-commits mailing list