'stored' => 'sourcefiles',
'dslip' => '03modlist.data.gz',
'update' => '86400',
- 'mod' => '02packages.details.txt.gz'
+ 'mod' => '02packages.details.txt.gz',
+ 'custom_index' => 'packages.txt',
},
'_build' => {
'plugins' => 'plugins',
'autobundle_prefix' => 'Snapshot',
'autdir' => 'authors',
'install_log_dir' => 'install-logs',
+ 'custom_sources' => 'custom-sources',
'sanity_check' => 1,
},
'_mirror' => {
=cut
$Conf->{'conf'}->{'signature'} = do {
- (can_run('gpg') || check_install(module => 'Crypt::OpenPGP')) ?1:0 };
+ check_install( module => 'Module::Signature', version => '0.06' )
+ and ( can_run('gpg') ||
+ check_install(module => 'Crypt::OpenPGP')
+ );
+ } ? 1 : 0;
=item skiptest
=cut
$Conf->{'program'}->{'sudo'} = do {
- $> # check for all install dirs!
- # installsiteman3dir is a 5.8'ism.. don't check
- # it on 5.6.x...
- ? ( -w $Config{'installsitelib'} &&
- ( defined $Config{'installsiteman3dir'} &&
- -w $Config{'installsiteman3dir'}
- ) &&
- -w $Config{'installsitebin'}
- ? undef
- : can_run('sudo')
- )
- : can_run('sudo')
+
+ ### let's assume you dont need sudo,
+ ### unless one of the below criteria tells us otherwise
+ my $sudo = undef;
+
+ ### you're a normal user, you might need sudo
+ if( $> ) {
+
+ ### check for all install dirs!
+ ### installsiteman3dir is a 5.8'ism.. don't check
+ ### it on 5.6.x...
+ ### you have write permissions to the installdir,
+ ### you don't need sudo
+ if( -w $Config{'installsitelib'} &&
+ ( defined $Config{'installsiteman3dir'} &&
+ -w $Config{'installsiteman3dir'}
+ ) && -w $Config{'installsitebin'}
+ ) {
+ $sudo = undef;
+
+ ### you have PERL_MM_OPT set to some alternate
+ ### install place. You probably have write permissions
+ ### to that
+ } elsif ( $ENV{'PERL_MM_OPT'} and
+ $ENV{'PERL_MM_OPT'} =~ /INSTALL|LIB|PREFIX/
+ ) {
+ $sudo = undef;
+
+ ### you probably don't have write permissions
+ } else {
+ $sudo = can_run('sudo');
+ }
+ }
+
+ ### and return the value
+ $sudo;
};
=item perlwrapper
? ($name.$ver, $name)
: ($name, $name.$ver);
};
-
+
+ ### patch from Steve Hay Fri 29 Jun 2007 14:26:02 GMT+02:00
+ ### Msg-Id: <4684FA5A.7030506@uk.radan.com>
+ ### look for files with a ".bat" extension as well on Win32
+ @bins = map { $_, "$_.bat" } @bins if $^O eq 'MSWin32';
+
my $path;
BIN: for my $bin (@bins) {
### parallel to your cpanp/cpanp-boxed
my $maybe = File::Spec->rel2abs(
- File::Spec->catdir( dirname($0), $bin )
+ File::Spec->catfile( dirname($0), $bin )
);
$path = $maybe and last BIN if -f $maybe;
### parallel to your CPANPLUS.pm:
### $INC{cpanplus}/../bin/cpanp-run-perl
$maybe = File::Spec->rel2abs(
- File::Spec->catdir(
+ File::Spec->catfile(
dirname($INC{'CPANPLUS.pm'}),
'..', # lib dir
'bin', # bin dir
### CPANPLUS.pm in
### /tmp/cp/lib/perl5/site_perl/5.8.8
$maybe = File::Spec->rel2abs(
- File::Spec->catdir(
+ File::Spec->catfile(
dirname( $INC{'CPANPLUS.pm'} ),
'..', '..', '..', '..', # 4x updir
'bin', # bin dir
### or user installs
### note that we don't use 'can_run' as it's
### not an executable, just a wrapper...
- for my $dir (split(/\Q$Config::Config{path_sep}\E/, $ENV{PATH}),
- File::Spec->curdir
+ ### prefer anything that's found in the path paralel to your $^X
+ for my $dir (File::Spec->rel2abs( dirname($^X) ),
+ split(/\Q$Config::Config{path_sep}\E/, $ENV{PATH}),
+ File::Spec->curdir,
) {
+
+ ### On VMS the path could be in UNIX format, and we
+ ### currently need it to be in VMS format
+ $dir = VMS::Filespec::vmspath($dir) if ON_VMS;
+
$maybe = File::Spec->catfile( $dir, $bin );
$path = $maybe and last BIN if -f $maybe;
}
### cross your fingers...
### pass '-P' to perl: "run program through C
### preprocessor before compilation"
+ ### XXX using -P actually changes the way some Makefile.PLs
+ ### are executed, so don't do that... --kane
error(loc(
- "Could not find the '%1' in your path".
+ "Could not find the '%1' binary in your path".
"--this may be a problem.\n".
"Please locate this program and set ".
- "your '%2' config entry to its path.\n",
- $name, 'perlwrapper'
+ "your '%2' config entry to its path.\n".
+ "From the default shell, you can do this by typing:\n\n".
+ " %3\n".
+ " %4\n",
+ $name, 'perlwrapper',
+ 's program perlwrapper FULL_PATH_TO_CPANP_RUN_PERL',
+ 's save'
));
return '';
}->();
### clean up paths if we are on win32
if( $^O eq 'MSWin32' ) {
for my $pgm ( $self->program->ls_accessors ) {
- $self->program->$pgm(
- Win32::GetShortPathName( $self->program->$pgm )
- ) if $self->program->$pgm and $self->program->$pgm =~ /\s+/;
+ my $path = $self->program->$pgm;
+
+ ### paths with whitespace needs to be shortened
+ ### for shell outs.
+ if ($path and $path =~ /\s+/) {
+ my($prog, $args);
+
+ ### patch from Steve Hay, 13nd of June 2007
+ ### msg-id: <467012A4.6060705@uk.radan.com>
+ ### windows directories are not allowed to end with
+ ### a space, so any occurrence of '\w\s+/\w+' means
+ ### we're dealing with arguments, not directory
+ ### names.
+ if ($path =~ /^(.*?)(\s+\/.*$)/) {
+ ($prog, $args) = ($1, $2);
+
+ ### otherwise, there are no arguments
+ } else {
+ ($prog, $args) = ($path, '');
+ }
+
+ $prog = Win32::GetShortPathName( $prog );
+ $self->program->$pgm( $prog . $args );
+ }
}
}