Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
b07bd7dc
Commit
b07bd7dc
authored
Jul 29, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 346343: Clean up all of checksetup prior to localconfig code
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
parent
0a075818
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
55 deletions
+33
-55
Constants.pm
Bugzilla/Constants.pm
+6
-0
Requirements.pm
Bugzilla/Install/Requirements.pm
+4
-0
checksetup.pl
checksetup.pl
+23
-55
No files found.
Bugzilla/Constants.pm
View file @
b07bd7dc
...
...
@@ -110,6 +110,7 @@ use File::Basename;
DB_MODULE
ROOT_USER
ON_WINDOWS
)
;
@
Bugzilla::Constants::
EXPORT_OK
=
qw(contenttypes)
;
...
...
@@ -299,8 +300,13 @@ use constant DB_MODULE => {
name
=>
'PostgreSQL'
},
};
# The user who should be considered "root" when we're giving
# instructions to Bugzilla administrators.
use
constant
ROOT_USER
=>
$^O
=~
/MSWin32/i
?
'Administrator'
:
'root'
;
# True if we're on Win32.
use
constant
ON_WINDOWS
=>
(
$^O
=~
/MSWin32/i
);
sub
bz_locations
{
# We know that Bugzilla/Constants.pm must be in %INC at this point.
# So the only question is, what's the name of the directory
...
...
Bugzilla/Install/Requirements.pm
View file @
b07bd7dc
...
...
@@ -220,6 +220,10 @@ sub check_requirements {
have_vers
(
$module
->
{
name
},
$module
->
{
version
},
$output
);
}
# If we're running on Windows, reset the input line terminator so that
# console input works properly - loading CGI tends to mess it up
$/
=
"\015\012"
if
ON_WINDOWS
;
if
(
$output
)
{
print
"\n"
;
...
...
checksetup.pl
View file @
b07bd7dc
...
...
@@ -262,38 +262,25 @@ pod2usage({-verbose => 1, -exitval => 1}) if $switch{'help'};
our
%
answer
=
%
{
read_answers_file
()};
my
$silent
=
scalar
(
keys
%
answer
)
&&
!
$switch
{
'verbose'
};
###########################################################################
# Display version information
###########################################################################
printf
"\n*** This is Bugzilla "
.
BUGZILLA_VERSION
.
" on perl %vd ***\n"
,
$
^
V
unless
$silent
;
###########################################################################
# Check required module
###########################################################################
use
Bugzilla::Install::
Requirements
;
#
# Here we check for --MODULES--
#
exit
if
!
check_requirements
(
!
$silent
)
->
{
pass
};
printf
"\n*** This is Bugzilla "
.
BUGZILLA_VERSION
.
" on perl %vd ***\n"
,
$
^
V
unless
$silent
;
# Check required --MODULES--
my
$module_results
=
check_requirements
(
!
$silent
);
exit
if
!
$module_results
->
{
pass
};
# Break out if checking the modules is all we have been asked to do.
exit
if
$switch
{
'check-modules'
};
# If we're running on Windows, reset the input line terminator so that
# console input works properly - loading CGI tends to mess it up
if
(
$^O
=~
/MSWin/i
)
{
$/
=
"\015\012"
;
}
###########################################################################
#
Global definition
s
#
Load Bugzilla Module
s
###########################################################################
# It's never safe to "use" a Bugzilla module in checksetup. If a module
# prerequisite is missing, and you "use" a module that requires it,
# then instead of our nice normal checksetup message, the user would
# get a cryptic perl error about the missing module.
# We need $::ENV{'PATH'} to remain defined.
my
$env
=
$::ENV
{
'PATH'
};
require
Bugzilla
;
...
...
@@ -302,11 +289,18 @@ $::ENV{'PATH'} = $env;
require
Bugzilla::
Config
;
import
Bugzilla::
Config
qw(: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.
require
Bugzilla::User::
Setting
;
import
Bugzilla::User::
Setting
qw(add_setting)
;
require
Bugzilla::
Util
;
import
Bugzilla::
Util
qw(bz_crypt trim html_quote is_7bit_clean
clean_text url_quote)
;
require
Bugzilla::
User
;
import
Bugzilla::
User
qw(insert_new_user)
;
require
Bugzilla::
Bug
;
import
Bugzilla::
Bug
qw(is_open_state)
;
###########################################################################
# Check and update local configuration
...
...
@@ -1424,32 +1418,6 @@ if ($^O !~ /MSWin32/i) {
}
###########################################################################
# Global Utility Library
###########################################################################
# This is done here, because some modules require params to be set up, which
# won't have happened earlier.
# It's never safe to "use" a Bugzilla module in checksetup. If a module
# prerequisite is missing, and you "use" a module that requires it,
# then instead of our nice normal checksetup message the user would
# get a cryptic perl error about the missing module.
# This is done so we can add new settings as developers need them.
require
Bugzilla::User::
Setting
;
import
Bugzilla::User::
Setting
qw(add_setting)
;
require
Bugzilla::
Util
;
import
Bugzilla::
Util
qw(bz_crypt trim html_quote is_7bit_clean
clean_text url_quote)
;
require
Bugzilla::
User
;
import
Bugzilla::
User
qw(insert_new_user)
;
require
Bugzilla::
Bug
;
import
Bugzilla::
Bug
qw(is_open_state)
;
###########################################################################
# Check GraphViz setup
###########################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment