From 80f550adf21f80703d4724694db8bc609c1b1297 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 12 Feb 2008 01:34:05 +0000 Subject: [PATCH] =?utf8?q?Bug=20414430:=20On=20Windows,=20checksetup.pl=20?= =?utf8?q?should=20mention=20the=20correct=20PPM=20repo=20based=20on=20the?= =?utf8?q?=20Perl=20version=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9?= =?utf8?q?ric=20Buclin=20=20r=3Dmkanat=20r=3Dglob=20a?= =?utf8?q?=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Install/Requirements.pm | 43 ++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index 899821cd4c..d5babec41c 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -301,6 +301,17 @@ sub _check_missing { return %missing; } +# Returns the build ID of ActivePerl. If several versions of +# ActivePerl are installed, it won't be able to know which one +# you are currently running. But that's our best guess. +sub _get_activestate_build_id { + eval 'use Win32::TieRegistry'; + return 0 if $@; + my $key = Win32::TieRegistry->new('LMachine\Software\ActiveState\ActivePerl') + or return 0; + return $key->GetValue("CurrentVersion"); +} + sub print_module_instructions { my ($check_results, $output) = @_; @@ -312,14 +323,19 @@ sub print_module_instructions { . ROOT_USER . ".\n\n"; if (ON_WINDOWS) { - print < -1) { + $url_to_theory58S = 'http://cpan.uwinnipeg.ca/PPMPackages/10xx/'; + } + # ActivePerl older than revision 819 require an additional command. + if (_get_activestate_build_id() < 819) { + $repo_up_cmd = <