This patch adds two modules: C4::Installer::PerlModule and C4::Installer::PerlDependencies. The latter provides a single point
of reference for cataloging Koha Perl dependencies. The former provides an OO style interface to the dependency catalog.
The format of C4::Installer::PerlDependencies is very simply an anonymous hash of hashes. Each second level hash takes this form:
'Foo::Bar' => {
'usage' => 'FooBar Feature',
'required' => '1', # 0 if optional
'min_ver' => '0.01',
},
New modules can be appended to C4::Installer::PerlDependencies as needed and will be picked up by every piece of code which needs
this information.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The web installer should log errors to the error log instead of only
dumping them to the browser. This will allow a record of the errors
which may be useful for later debugging.
C4::Installer provides a way to update the kohaversion syspref. Now that
C4::Context caches syspref values, any updated value through C4::Installer
is not being seen.
This patch adds a method to C4::Context to allow you to clean that
cache. Then, it calls that method when the kohaversion syspref is changed.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Created a new module, C4::Installer, which embodies
most of the code from installer/install.pl that handles
identifying and loading SQL scripts and setting the
Version, marcflavour, FrameworksLoad, and NoZebra
system preferences.
With C4::Installer, it is now easier to automate
initializing and populating a Koha database. This will
help allow the test suite to set up a test database
in order to run DB-dependent tests, as well as write
a command-line installer which may be of use to hosts
that need to support multiple Koha databases.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>