r45860 - in /trunk/dh-make-perl: debian/changelog lib/DhMakePerl.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Oct 15 23:02:14 UTC 2009
Author: gregoa
Date: Thu Oct 15 23:01:05 2009
New Revision: 45860
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45860
Log:
Make sure we use the original $ENV{'PWD'} before CPAN::Distribution::get()
resets it.
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=45860&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Thu Oct 15 23:01:05 2009
@@ -1,8 +1,13 @@
dh-make-perl (0.61) UNRELEASED; urgency=low
+ [ Salvatore Bonaccorso ]
* Update template license text for debian/copyright to follow the DEP5
Format-Specification at http://dep.debian.net/deps/dep5/. Update texts
layout and drop use of License-Alias: Perl.
+
+ [ gregor herrmann ]
+ * Make sure we use the original $ENV{'PWD'} before CPAN::Distribution::get()
+ resets it.
-- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Sun, 04 Oct 2009 16:21:18 +0200
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=45860&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Thu Oct 15 23:01:05 2009
@@ -490,7 +490,11 @@
my ( $dist, $mod, $tarball );
$mod_cpan_version = '';
if ( $self->cfg->cpan ) {
- my ($new_maindir);
+ my ($new_maindir, $orig_pwd);
+
+ # CPAN::Distribution::get() sets $ENV{'PWD'} to $CPAN::Config->{build_dir}
+ # so we have to save it here
+ $orig_pwd = $ENV{'PWD'};
# Is the module a core module?
if ( $self->is_core_module( $self->cfg->cpan ) ) {
@@ -509,16 +513,16 @@
$dist = $CPAN::META->instance( 'CPAN::Distribution',
$mod->cpan_file );
- $dist->get || die "Cannot get ", $mod->cpan_file, "\n";
+ $dist->get || die "Cannot get ", $mod->cpan_file, "\n"; # <- here $ENV{'PWD'} gets set to $HOME/.cpan/build
$tarball .= $mod->cpan_file;
$self->main_dir( $dist->dir );
- copy( $tarball, $ENV{'PWD'} );
- $tarball = $ENV{'PWD'} . "/" . basename($tarball);
+ copy( $tarball, $orig_pwd );
+ $tarball = $orig_pwd . "/" . basename($tarball);
# build_dir contains a random part since 1.88_59
# use the new CPAN::Distribution::base_id (introduced in 1.91_53)
- $new_maindir = $ENV{PWD} . "/" . $dist->base_id;
+ $new_maindir = $orig_pwd . "/" . $dist->base_id;
# rename existing directory
if ( -d $new_maindir
More information about the Pkg-perl-cvs-commits
mailing list