Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 5 commits
  • 1 file changed
  • 0 comments
  • 1 contributor
Aug 18, 2012
don't insist on Safe c383692
drop dysfunctional way of CPAN configuring
cpan -j does not have a promt we could automate
a9179bc
try hard on essential modules
...by going backwards for lots of known
versions until it finds one that fits
the currently used Perl version.
e614b7e
force Benchmark::Perl::Formance
...because that's the whole deal of it
and if it fails then only on dependencies which
it later simply ignores at runtime.
15f129b
faster CPAN index expiration
...to faster adapt to CPAN changes, usually my
own modules Perl::Formance or deps.
d50f234

Showing 1 changed file with 38 additions and 17 deletions. Show diff stats Hide diff stats

  1. 55  bin/bootstrap-perl
55  bin/bootstrap-perl
@@ -342,10 +342,13 @@ if ($help) {
342 342
 #   -m http://perlformance.net/CPAN/ \
343 343
 #   --run benchmark-perlformance \
344 344
 #   --runargs=--plugins=ALL
  345
+#                       RGARCIA/Safe-2.29.tar.gz
  346
+#                       RGARCIA/Safe-2.30.tar.gz
  347
+#                       RGARCIA/Safe-2.32.tar.gz
  348
+#                       RGARCIA/Safe-2.33.tar.gz
345 349
 if ($perlformance or $perlformance_report) {
346 350
         @modules = qw( Digest::SHA1
347 351
                        DB_File
348  
-                       RGARCIA/Safe-2.29.tar.gz
349 352
                        Safe
350 353
                        Module::Build
351 354
                        Mail::DKIM
@@ -411,7 +414,6 @@ if ($installdeps) {
411 414
                 print "Allowed distros: ".join(", ", @SUPPORTED_DISTROS), "\n";
412 415
                 exit 1;
413 416
         }
414  
-                
415 417
 }
416 418
 
417 419
 # ========== prepare ==========
@@ -619,9 +621,6 @@ if ($cpan)
619 621
         # force a CPAN.pm with all features we need, assume old-school CPAN.pm
620 622
         print_and_system qq{if [ -L $bin_cpan -o ! -e $bin_cpan ] ; then /bin/rm $bin_cpan ; echo "force install CPAN" | $PERL -MCPAN -e shell ; fi};
621 623
 
622  
-        # configure
623  
-        print_and_system qq!echo "o conf auto_commit 1 ; o conf commit" | $bin_cpan -j $CFG!;
624  
-
625 624
         # once upon a time the cpan exe missed the executable bit - set it to be sure
626 625
         print_and_system qq!chmod +x $CPAN!;
627 626
         print_and_system qq!chmod +x $bin_cpan!;
@@ -629,17 +628,35 @@ if ($cpan)
629 628
         # install extended cpan toolchain; contains some "force" where we know they are really required
630 629
         print_and_system qq!$bin_cpan -j $CFG YAML::XS!;
631 630
         print_and_system qq!$bin_cpan -j $CFG YAML!;
632  
-        # try every YAML under the Sun - yes this IS pain!
633  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.76.tar.gz ; fi };
634  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.77.tar.gz ; fi };
635  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.78.tar.gz ; fi };
636  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.79.tar.gz ; fi };
637  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.80.tar.gz ; fi };
638  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG INGY/YAML-0.81.tar.gz ; fi };
639  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG MSTROUT/YAML-0.82.tar.gz ; fi };
640  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG MSTROUT/YAML-0.83.tar.gz ; fi };
641  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG MSTROUT/YAML-0.84.tar.gz ; fi };
642  
-        print_and_system qq{if ! $PERL -MYAML -e1 ; then $bin_cpan -j $CFG -f -i YAML ; fi };
  631
+
  632
+        # try really hard with some modules until we find a version
  633
+        # that fits currrent Perl
  634
+        my %mod_dists = (
  635
+                         "YAML" => [qw(MSTROUT/YAML-0.84.tar.gz
  636
+                                       MSTROUT/YAML-0.83.tar.gz
  637
+                                       MSTROUT/YAML-0.82.tar.gz
  638
+                                       INGY/YAML-0.81.tar.gz
  639
+                                       INGY/YAML-0.80.tar.gz
  640
+                                       INGY/YAML-0.79.tar.gz
  641
+                                       INGY/YAML-0.78.tar.gz
  642
+                                       INGY/YAML-0.77.tar.gz
  643
+                                       INGY/YAML-0.76.tar.gz)],
  644
+                         "Devel::Size" => [qw(NWCLARK/Devel-Size-0.78.tar.gz
  645
+                                              NWCLARK/Devel-Size-0.77.tar.gz
  646
+                                              NWCLARK/Devel-Size-0.76.tar.gz
  647
+                                              NWCLARK/Devel-Size-0.75.tar.gz
  648
+                                              BROWSERUK/Devel-Size-0.72.tar.gz
  649
+                                              TELS/devel/Devel-Size-0.71.tar.gz
  650
+                                              TELS/devel/Devel-Size-0.70.tar.gz)],
  651
+                         );
  652
+
  653
+        foreach my $mod (keys %mod_dists) {
  654
+                foreach my $dist (@{$mod_dists{$mod}}) {
  655
+                        print_and_system qq{if ! $PERL -M$mod -e1 ; then $bin_cpan -j $CFG $dist ; fi };
  656
+                }
  657
+                print_and_system qq{if ! $PERL -M$mod -e1 ; then $bin_cpan -j $CFG -f -i $mod ; fi };
  658
+        }
  659
+
643 660
         print_and_system qq{if ! $PERL -MIO::Compress::Base -e1 ; then $bin_cpan -j $CFG -f -i IO::Compress::Base ; fi };
644 661
         if ($gitdescribe =~ /perl-5\.8\.0/) {
645 662
                 # ignore known failing tests
@@ -664,6 +681,10 @@ if ($cpan)
664 681
         # install modules from CPAN
665 682
         foreach my $module (@MODULES) {
666 683
                 print_and_system qq!$bin_cpan -j $CFG -i $module!;
  684
+                if ($module =~ qr/^(Benchmark::Perl::Formance|Mail::SPF)$/) {
  685
+                        # That's the whole deal, so we force it.
  686
+                        print_and_system qq{if ! $PERL -M$module -e1 ; then $bin_cpan -j $CFG -f -i $module ; fi };
  687
+                }
667 688
         }
668 689
 } # if ($cpan)
669 690
 
@@ -710,7 +731,7 @@ $CPAN::Config = {
710 731
   'histsize' => q[100],
711 732
   'http_proxy' => q[],
712 733
   'inactivity_timeout' => q[0],
713  
-  'index_expire' => q[1],
  734
+  'index_expire' => q[0],
714 735
   'inhibit_startup_message' => q[0],
715 736
   'keep_source_where' => q[/opt/cpan/sources],
716 737
   'load_module_verbosity' => q[v],

No commit comments for this range

Something went wrong with that request. Please try again.