diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-04-21 00:00:57 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-04-21 00:00:57 +0200 |
commit | 00d71f7cd9251f39015ce724af0794c6931f0db7 (patch) | |
tree | a8796d30acb65bc71063593cccaa815b6eaee135 /install-module.pl | |
parent | b2b1427ab7605f483f7b32381701bdf14cc174f9 (diff) | |
download | bugzilla-00d71f7cd9251f39015ce724af0794c6931f0db7.tar.gz bugzilla-00d71f7cd9251f39015ce724af0794c6931f0db7.tar.xz |
Bug 560330: Make sure that we always have a modern version of CPAN
installed when running install-module.pl. Otherwise, certain modules
(like DateTime) weren't getting their XS compiled or their dependencies
installed with Perl 5.8.8 and earlier.
This also updates the urllist to remove perl.secsup.org (which was
hanging when used with curl) and add a few more mirrors (including
some in Europe).
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'install-module.pl')
-rwxr-xr-x | install-module.pl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/install-module.pl b/install-module.pl index f3c6ba461..a78d7ceff 100755 --- a/install-module.pl +++ b/install-module.pl @@ -26,7 +26,7 @@ use warnings; # CPAN has chdir'ed around. We do all of this in this funny order to # make sure that we use the lib/ modules instead of the base Perl modules, # in case the lib/ modules are newer. -use Cwd qw(abs_path); +use Cwd qw(abs_path cwd); use lib abs_path('.'); use Bugzilla::Constants; use lib abs_path(bz_locations()->{ext_libpath}); @@ -35,14 +35,17 @@ use Bugzilla::Install::CPAN; use Bugzilla::Constants; use Bugzilla::Install::Requirements; -use Bugzilla::Install::Util qw(bin_loc); +use Bugzilla::Install::Util qw(bin_loc init_console vers_cmp); use Data::Dumper; use Getopt::Long; use Pod::Usage; -our %switch; +init_console(); +my @original_args = @ARGV; +my $original_dir = cwd(); +our %switch; GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g', 'shell', 'help|h'); @@ -66,12 +69,7 @@ if ($switch{'show-config'}) { exit; } -my $can_notest = 1; -if (substr(CPAN->VERSION, 0, 3) < 1.8) { - $can_notest = 0; - print "* Note: If you upgrade your CPAN module, installs will be faster.\n"; - print "* You can upgrade CPAN by doing: $^X install-module.pl CPAN\n"; -} +check_cpan_requirements($original_dir, \@original_args); if ($switch{'shell'}) { CPAN::shell(); @@ -103,12 +101,12 @@ if ($switch{'all'} || $switch{'upgrade-all'}) { next if $cpan_name eq 'mod_perl2'; next if $cpan_name eq 'DBD::Oracle' and !$ENV{ORACLE_HOME}; next if $cpan_name eq 'DBD::Pg' and !bin_loc('pg_config'); - install_module($cpan_name, $can_notest); + install_module($cpan_name); } } foreach my $module (@ARGV) { - install_module($module, $can_notest); + install_module($module); } __END__ |