summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/CPAN.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-21 02:00:42 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-21 02:00:42 +0200
commit69fca5ee6996979b99598f30961d543f2d2317e7 (patch)
tree046f7cebda1a15ca02096c790fee36ba7511f4c7 /Bugzilla/Install/CPAN.pm
parent98820141e34dedce1d5282457a6320c909322a33 (diff)
downloadbugzilla-69fca5ee6996979b99598f30961d543f2d2317e7.tar.gz
bugzilla-69fca5ee6996979b99598f30961d543f2d2317e7.tar.xz
Bug 560691: Make sure that install-module.pl never prompts the user while
installing modules r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/Install/CPAN.pm')
-rw-r--r--Bugzilla/Install/CPAN.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/Bugzilla/Install/CPAN.pm b/Bugzilla/Install/CPAN.pm
index b98d85631..bda283ce2 100644
--- a/Bugzilla/Install/CPAN.pm
+++ b/Bugzilla/Install/CPAN.pm
@@ -127,6 +127,12 @@ sub install_module {
my ($name, $test) = @_;
my $bzlib = BZ_LIB;
+ # Make Module::AutoInstall install all dependencies and never prompt.
+ local $ENV{PERL_AUTOINSTALL} = '--alldeps';
+ # This makes Net::SSLeay not prompt the user, if it gets installed.
+ # It also makes any other MakeMaker prompts accept their defaults.
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+
# Certain modules require special stuff in order to not prompt us.
my $original_makepl = $CPAN::Config->{makepl_arg};
# This one's a regex in case we're doing Template::Plugin::GD and it
@@ -137,12 +143,13 @@ sub install_module {
elsif ($name eq 'XML::Twig') {
$CPAN::Config->{makepl_arg} = "-n $original_makepl";
}
- elsif ($name eq 'Net::LDAP') {
- $CPAN::Config->{makepl_arg} .= " --skipdeps";
- }
elsif ($name eq 'SOAP::Lite') {
$CPAN::Config->{makepl_arg} .= " --noprompt";
}
+ # MIME-tools has a Module::Install that's too old to understand alldeps.
+ elsif ($name =~ /^MIME::/) {
+ $ENV{PERL_AUTOINSTALL} = '--defaultdeps';
+ }
my $module = CPAN::Shell->expand('Module', $name);
print install_string('install_module',