aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordkl%redhat.com <>2002-05-21 10:37:50 +0000
committerdkl%redhat.com <>2002-05-21 10:37:50 +0000
commit7cd5d5f35a182f65c18145fb5be937cda1d2f5f0 (patch)
tree22fff0ec845c7d9467d2788455692d448829a162 /checksetup.pl
parentFix for bug 144091: adding old-params.txt to .cvsignore (diff)
downloadbugzilla-7cd5d5f35a182f65c18145fb5be937cda1d2f5f0.tar.gz
bugzilla-7cd5d5f35a182f65c18145fb5be937cda1d2f5f0.tar.bz2
bugzilla-7cd5d5f35a182f65c18145fb5be937cda1d2f5f0.zip
Bug 143586 - required modules tests should be sorted. Patch by David Lawrence <dkl@redhat.com> r=justdave@syndicomm.com,bbaetz@student.usyd.edu.au
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl54
1 files changed, 42 insertions, 12 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 248bdcc8e..812a22416 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -174,20 +174,50 @@ sub have_vers {
}
# Check versions of dependencies. 0 for version = any version acceptible
-my %modules = (
- "DBI" => "1.13",
- "Data::Dumper" => "0",
- "DBD::mysql" => "1.2209",
- "Date::Parse" => "0",
- "AppConfig" => "1.52",
- "Template" => "2.07",
- "Text::Wrap" => "2001.0131",
- "File::Spec" => "0.82"
-);
+my $modules = [
+ {
+ name => 'AppConfig',
+ version => '1.52'
+ },
+ {
+ name => 'CGI::Carp',
+ version => '0'
+ },
+ {
+ name => 'Data::Dumper',
+ version => '0'
+ },
+ {
+ name => 'Date::Parse',
+ version => '0'
+ },
+ {
+ name => 'DBI',
+ version => '1.13'
+ },
+ {
+ name => 'DBD::mysql',
+ version => '1.2209'
+ },
+ {
+ name => 'File::Spec',
+ version => '0.82'
+ },
+ {
+ name => 'Template',
+ version => '2.07'
+ },
+ {
+ name => 'Text::Wrap',
+ version => '2001.0131'
+ }
+];
my %missing = ();
-foreach my $module (keys %modules) {
- unless (have_vers($module, $modules{$module})) { $missing{$module} = $modules{$module} }
+foreach my $module (@{$modules}) {
+ unless (have_vers($module->{name}, $module->{version})) {
+ $missing{$module->{name}} = $module->{version};
+ }
}
# If CGI::Carp was loaded successfully for version checking, it changes the