Bug 143586 - required modules tests should be sorted. Patch by David Lawrence <dkl@redhat.com> r=justdave@syndicomm.com,bbaetz@student.usyd.edu.au

This commit is contained in:
dkl%redhat.com 2002-05-21 03:42:35 +00:00
Родитель 2ba593c5d5
Коммит 6804f33ca7
1 изменённых файлов: 42 добавлений и 12 удалений

Просмотреть файл

@ -174,20 +174,50 @@ sub have_vers {
} }
# Check versions of dependencies. 0 for version = any version acceptible # Check versions of dependencies. 0 for version = any version acceptible
my %modules = ( my $modules = [
"DBI" => "1.13", {
"Data::Dumper" => "0", name => 'AppConfig',
"DBD::mysql" => "1.2209", version => '1.52'
"Date::Parse" => "0", },
"AppConfig" => "1.52", {
"Template" => "2.07", name => 'CGI::Carp',
"Text::Wrap" => "2001.0131", version => '0'
"File::Spec" => "0.82" },
); {
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 = (); my %missing = ();
foreach my $module (keys %modules) { foreach my $module (@{$modules}) {
unless (have_vers($module, $modules{$module})) { $missing{$module} = $modules{$module} } unless (have_vers($module->{name}, $module->{version})) {
$missing{$module->{name}} = $module->{version};
}
} }
# If CGI::Carp was loaded successfully for version checking, it changes the # If CGI::Carp was loaded successfully for version checking, it changes the