X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F20_install.bash;h=aab2e7ef8e14dc10808d6a933b20ccf489443598;hb=ab314234bf2ad136f2d6daaf48294139ffc985ee;hp=02e2041be68a49fdf8aa3102ffc0d2fdd2153fec;hpb=fb954d9d3d179dbadb87af9184653e1ce5c2b01a;p=dbsrgits%2FDBIx-Class.git diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash index 02e2041..aab2e7e 100755 --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -9,7 +9,7 @@ CPAN_MIRROR="http://cpan.metacpan.org/" PERL_CPANM_OPT="$PERL_CPANM_OPT --mirror $CPAN_MIRROR" # do not set PERLBREW_CPAN_MIRROR - not all backpan-like mirrors have the perl tarballs -export PERL_MM_USE_DEFAULT=1 PERL_MM_NONINTERACTIVE=1 PERL_AUTOINSTALL_PREFER_CPAN=1 HARNESS_TIMER=1 MAKEFLAGS="-j$NUMTHREADS" +export PERL_MM_USE_DEFAULT=1 PERL_MM_NONINTERACTIVE=1 PERL_AUTOINSTALL_PREFER_CPAN=1 HARNESS_TIMER=1 MAKEFLAGS="-j$VCPU_USE" # try CPAN's latest offering if requested if [[ "$DEVREL_DEPS" == "true" ]] ; then @@ -22,14 +22,21 @@ fi export PERL_CPANM_OPT="--verbose --no-interactive --no-man-pages $( echo $PERL_CPANM_OPT | sed 's/--skip-satisfied//' )" if [[ -n "$BREWVER" ]] ; then + # since perl 5.14 a perl can safely be built concurrently with -j$large # (according to brute force testing and my power bill) - if [[ "$BREWVER" == "blead" ]] || perl -Mversion -e "exit !!(version->new(q($BREWVER)) < 5.014)" ; then - perlbrew_jopt="$NUMTHREADS" + if [[ "$BREWVER" =~ [A-Za-z] ]] || perl -Mversion -e "exit !!(version->new(q($BREWVER)) < 5.014)" ; then + perlbrew_jopt="$VCPU_USE" + fi + + BREWSRC="$BREWVER" + + if [[ "$BREWVER" == "schmorp_stableperl" ]] ; then + BREWSRC="http://stableperl.schmorp.de/dist/stableperl-5.22.0-1.001.tar.gz" fi run_or_err "Compiling/installing Perl $BREWVER (without testing, using ${perlbrew_jopt:-1} threads, may take up to 5 minutes)" \ - "perlbrew install --as $BREWVER --notest --noman --verbose $BREWOPTS -j${perlbrew_jopt:-1} $BREWVER" + "perlbrew install --as $BREWVER --notest --noman --verbose $BREWOPTS -j${perlbrew_jopt:-1} $BREWSRC" # can not do 'perlbrew uss' in the run_or_err subshell above, or a $() # furthermore `perlbrew use` returns 0 regardless of whether the perl is @@ -116,3 +123,7 @@ if [[ "$CLEANTEST" != "true" ]] ; then export DBICTEST_SQLT_DEPLOY=1 fi + +# FIXME - work around https://github.com/miyagawa/cpanminus/issues/462 +# seriously... +perl -p -i -e 's/\blocal\$self->\{notest\}=1;//' $(which cpanm)