[Bps-public-commit] r16879 - Shipwright/branches/1.10/lib/Shipwright/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Nov 17 14:16:07 EST 2008
Author: sunnavy
Date: Mon Nov 17 14:16:04 2008
New Revision: 16879
Modified:
Shipwright/branches/1.10/lib/Shipwright/Source/CPAN.pm
Log:
merged 16878 to 1.1
Modified: Shipwright/branches/1.10/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Source/CPAN.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Source/CPAN.pm Mon Nov 17 14:16:04 2008
@@ -43,9 +43,12 @@
unless ( -f $config_file ) {
# hack $CPAN::Config, mostly to make cpan stuff temporary
- $CPAN::Config->{cpan_home} = catdir($cpan_dir);
- $CPAN::Config->{build_dir} = catdir( $cpan_dir, 'build' );
- $CPAN::Config->{histfile} = catfile( $cpan_dir, 'histfile' );
+ $CPAN::Config->{cpan_home} = catdir($cpan_dir);
+ $CPAN::Config->{build_dir} = catdir( $cpan_dir, 'build' );
+ $CPAN::Config->{histfile} = catfile( $cpan_dir, 'histfile' );
+
+ # be careful, if you use minicpan, then the source won't be copied to
+ # $CPAN::Config->{keep_source_where}
$CPAN::Config->{keep_source_where} = catdir( $cpan_dir, 'sources' );
$CPAN::Config->{prefs_dir} = catdir( $cpan_dir, 'prefs' );
$CPAN::Config->{prerequisites_policy} = 'follow';
@@ -128,7 +131,7 @@
$version = 'v' . $version;
}
$distribution->{ID} =~ s/$latest_version/$version/;
- $source =~ s/$latest_version/$version/;
+ $source =~ s/$latest_version/$version/;
}
}
@@ -138,16 +141,12 @@
confess 'perl itself contains ' . $self->source . ', will not process';
}
- $distribution->get;
-
Shipwright::Util->select('stdout');
$self->name( 'cpan-' . $name );
$self->_update_map( $self->source, 'cpan-' . $name );
- $self->source(
- catfile( $CPAN::Config->{keep_source_where}, 'authors', 'id', $source )
- );
+ $self->source($distribution->get_file_onto_local_disk);
return 1;
}
More information about the Bps-public-commit
mailing list