<<

Bugzilla::Install::Requirements

NAME

Bugzilla::Install::Requirements - Functions and variables dealing with Bugzilla's perl-module requirements.

DESCRIPTION

This module is used primarily by checksetup.pl to determine whether or not all of Bugzilla's prerequisites are installed. (That is, all the perl modules it requires.)

CONSTANTS

REQUIRED_MODULES

An arrayref of hashrefs that describes the perl modules required by Bugzilla. The hashes have three keys:

package - The name of the Perl package that you'd find on CPAN for this requirement.
module - The name of a module that can be passed to the install command in CPAN.pm to install this module.
version - The version of this module that we require, or 0 if any version is acceptable.
OPTIONAL_MODULES

An arrayref of hashrefs that describes the perl modules that add additional features to Bugzilla if installed. Its hashes have all the fields of "REQUIRED_MODULES", plus a feature item--an arrayref of strings that describe what features require this module.

FEATURE_FILES

A hashref that describes what files should only be compiled if a certain feature is enabled. The feature is the key, and the values are arrayrefs of file names (which are passed to glob, so shell patterns work).

SUBROUTINES

check_requirements
Description

This checks what optional or required perl modules are installed, like checksetup.pl does.

Params
$output - true if you want the function to print out information about what it's doing, and the versions of everything installed.
Returns

A hashref containing these values:

pass - Whether or not we have all the mandatory requirements.
missing - An arrayref containing any required modules that are not installed or that are not up-to-date. Each item in the array is a hashref in the format of items from "REQUIRED_MODULES".
optional - The same as missing, but for optional modules.
apache - The name of each optional Apache module that is missing.
have_one_dbd - True if at least one DBD:: module is installed.
any_missing - True if there are any missing Perl modules, even optional modules.
check_graphviz($output)

Description: Checks if the graphviz binary specified in the webdotbase parameter is a valid binary, or a valid URL.

Params: $output - $true if you want the function to print out information about what it's doing.

Returns: 1 if the check was successful, 0 otherwise.

have_vers($module, $output)
 Description: Tells you whether or not you have the appropriate
              version of the module requested. It also prints
              out a message to the user explaining the check
              and the result.

 Params:      C<$module> - A hashref, in the format of an item from 
                           L</REQUIRED_MODULES>.
              C<$output> - Set to true if you want this function to
                           print information to STDOUT about what it's
                           doing.

 Returns:   C<1> if you have the module installed and you have the
            appropriate version. C<0> otherwise.
install_command($module)
 Description: Prints out the appropriate command to install the
              module specified, depending on whether you're
              on Windows or Linux.

 Params:      C<$module> - A hashref, in the format of an item from
                           L</REQUIRED_MODULES>.

 Returns:     nothing
map_files_to_features

Returns a hashref where file names are the keys and the value is the feature that must be enabled in order to compile that file.

<<