X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=script%2Fbootstrap.pl;h=c068563ccdefa1063a9967c16b3a01475fc550c7;hb=3620aa21666f20c634edcf3a6ec6f16580bbda1f;hp=3ee6ed27f0119eeb21fbb0a0ba4914d699e7a0b4;hpb=42b626cdae7cb7a3d8a911bdb0c0b23f073763af;p=catagits%2FGitalist.git diff --git a/script/bootstrap.pl b/script/bootstrap.pl index 3ee6ed2..c068563 100644 --- a/script/bootstrap.pl +++ b/script/bootstrap.pl @@ -44,22 +44,15 @@ lib->import("$target/lib/perl5"); # can't access local %CPAN::Config; -require CPAN::HandleConfig;w +require CPAN::HandleConfig; CPAN::HandleConfig->load(); -$CPAN::Config->{prefs_dir} = "~/.cpan/prefs"; - -# First just force install local::lib to get it local to $target -force(qw/install LWP::UserAgent/); # Need LWP for CPAN to work on Mac, as curl and - # wget puke on the spaces in - # ~/Library/Applicaton Support - # Note - this needs to happen before File::HomeDir -# Need to force File::HomeDir on the Mac -if ($^O eq "darwin") { - force(qw/install Mac::Carbon/); -} +$CPAN::Config->{prefs_dir} = "$ENV{HOME}/.cpan/prefs"; + force(qw/install local::lib/); +require lib::core::only; # Turn lib::core:only on require local::lib; # Turn local::lib on +lib::core::only->import(); local::lib->import( $target ); # Become fully self contained @@ -69,7 +62,8 @@ $ENV{PERL5LIB} = ""; # If we used a local::lib to bootstrap, this kills it. $ENV{PERL_AUTOINSTALL_PREFER_CPAN}=1; $ENV{PERL_MM_OPT} .= " INSTALLMAN1DIR=none INSTALLMAN3DIR=none"; -local::lib->import( '--self-contained', $target ); +lib::core::only->import(); +local::lib->import( $target ); # Force a re-install of local::lib here to get the dependencies for local::lib # It requires things which ensure we have an unfucked toolchain :) @@ -79,29 +73,9 @@ force(qw/install local::lib/); install('Module::Install'); install('YAML'); install('CPAN'); +# For some reason this isn't installed along with M::I::Catalyst. +install('File::Copy::Recursive'); install('Module::Install::Catalyst'); -# setup distroprefs -{ - # Ok, god only knows what version of CPAN we started with, so lets nuke the - # config and try to reload it here for safety - local %CPAN::Config; - require CPAN::HandleConfig; # not installed till we installed CPAN (5.8.x) - CPAN::HandleConfig->load(); - mkdir $CPAN::Config->{prefs_dir} unless -d $CPAN::Config->{prefs_dir}; - open(my $prefs, ">", File::Spec->catfile($CPAN::Config->{prefs_dir}, - "catalyst_local-lib-disable-mech-live.yml")) or die "Can't open prefs_dir: $!"; - - print $prefs qq{--- -comment: "WWW-Mechanize regularly fails its live tests, turn them off." -match: - distribution: "^PETDANCE/WWW-Mechanize-1.\\d+\\.tar\\.gz" -patches: - - "BOBTFISH/WWW-Mechanize-1.XX-BOBTFISH-01_notests.patch.gz" -}; - - close($prefs); -} - -print "local::lib setup, type perl Makefile.PL && make installdeps to install dependencies"; +print "local::lib setup, type perl Makefile.PL && make installdeps to install dependencies\n";