summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2002-09-30 08:01:11 +0200
committerjustdave%syndicomm.com <>2002-09-30 08:01:11 +0200
commitf051e39300daa8966a2729b5d2e4729594341acb (patch)
tree5fb54496668694ad48a056d57c6a520a0bf2a311
parentb66451a33b03459c574786373aaf39e7a9ef9705 (diff)
downloadbugzilla-f051e39300daa8966a2729b5d2e4729594341acb.tar.gz
bugzilla-f051e39300daa8966a2729b5d2e4729594341acb.tar.xz
Fix for bug 1700073: checksetup.pl (indirectly via Bugzilla::Config.pm) had a dependency on File::Temp, which caused it to
crash before the version checks were even done to warn the admin that it wasn't present. This patch reorders the loading sequence in checksetup.pl so that the version checks are done before the Config module is loaded. 2xr=bbaetz
-rwxr-xr-xchecksetup.pl35
1 files changed, 22 insertions, 13 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 737a629e8..83cc06a5f 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -110,20 +110,7 @@
#
#
-###########################################################################
-# Global definitions
-###########################################################################
-
use strict;
-
-use Bugzilla::Config qw(:DEFAULT :admin);
-
-# 12/17/00 justdave@syndicomm.com - removed declarations of the localconfig
-# variables from this location. We don't want these declared here. They'll
-# automatically get declared in the process of reading in localconfig, and
-# this way we can look in the symbol table to see if they've been declared
-# yet or not.
-
use vars qw( $db_name %answer );
###########################################################################
@@ -237,6 +224,10 @@ my $modules = [
name => 'File::Spec',
version => '0.82'
},
+ {
+ name => 'File::Temp',
+ version => '0'
+ },
{
name => 'Template',
version => '2.07'
@@ -294,6 +285,24 @@ if (%missing) {
exit;
}
+###########################################################################
+# Global definitions
+###########################################################################
+
+# We use require + import here instead of "use" to load Bugzilla::Config
+# because Bugzilla::Config has dependencies on some of the modules tested
+# for above, so we need to wait until those dependency checks have been
+# done before loading it, rather than loading it at compile time.
+# see http://bugzilla.mozilla.org/show_bug.cgi?id=170073
+
+require Bugzilla::Config;
+import Bugzilla::Config qw(:DEFAULT :admin);
+
+# 12/17/00 justdave@syndicomm.com - removed declarations of the localconfig
+# variables from this location. We don't want these declared here. They'll
+# automatically get declared in the process of reading in localconfig, and
+# this way we can look in the symbol table to see if they've been declared
+# yet or not.
###########################################################################
# Check and update local configuration