summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Hook.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-10-17 15:05:14 +0200
committermkanat%bugzilla.org <>2006-10-17 15:05:14 +0200
commitfcd10254fead1576d691b3a0ba212c67239c0b3e (patch)
tree93aebd6d5e79a7e63d602121131bf021416e1936 /Bugzilla/Hook.pm
parent124ab7cdf76cf58d8f5d772f51a2a142bb59d5ed (diff)
downloadbugzilla-fcd10254fead1576d691b3a0ba212c67239c0b3e.tar.gz
bugzilla-fcd10254fead1576d691b3a0ba212c67239c0b3e.tar.xz
Bug 350220: Add hooks to checksetup for extensions.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=myk
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index be4a70077..f8167cd65 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -139,6 +139,30 @@ Params:
=back
+=head2 install-requirements
+
+Because of the way Bugzilla installation works, there can't be a normal
+hook during the time that F<checksetup.pl> checks what modules are
+installed. (C<Bugzilla::Hook> needs to have those modules installed--it's
+a chicken-and-egg problem.)
+
+So instead of the way hooks normally work, this hook just looks for two
+subroutines (or constants, since all constants are just subroutines) in
+your file, called C<OPTIONAL_MODULES> and C<REQUIRED_MODULES>,
+which should return arrayrefs in the same format as C<OPTIONAL_MODULES> and
+C<REQUIRED_MODULES> in L<Bugzilla::Install::Requirements>.
+
+These subroutines will be passed an arrayref that contains the current
+Bugzilla requirements of the same type, in case you want to modify
+Bugzilla's requirements somehow. (Probably the most common would be to
+alter a version number or the "feature" element of C<OPTIONAL_MODULES>.)
+
+F<checksetup.pl> will add these requirements to its own.
+
+Please remember--if you put something in C<REQUIRED_MODULES>, then
+F<checksetup.pl> B<cannot complete> unless the user has that module
+installed! So use C<OPTIONAL_MODULES> whenever you can.
+
=head2 install-update_db
This happens at the very end of all the tables being updated