Browse Source

Bug 12932: Check the Perl version even if all modules installed

The description in comment #0 is quite true, because the
scope of the $checkmodule variable is local to just the
module checking. If we change the scope, we can include the
perl check as part of the new scope, and thus properly set
its value.

As Debian Jessie, Stretch and Ubuntu Xenial all have good
versions of Perl by default, the easiest way to test this
is to:
- make sure to have some optional modules not installed.
- change the system preference 'Version' to one just under
  the current version in your SQL client.
- modify the version check line to 5.030000
- restart_all and try going to the staff client.
  -- This should not inform you that your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- modify the version check line to 5.030000
- change the system preference 'Version' to one just under
  the current version in your SQL client.
- restart_all and try going to the staff client.
  -- This should trigger the patch, and you should
     be informed your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- run koha qa test tools

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Mark Tompsett 5 years ago
committed by Jonathan Druart
parent
commit
f3d62e4331
  1. 3
      installer/install.pl

3
installer/install.pl

@ -89,11 +89,13 @@ if ( $step && $step == 1 ) {
#Whenever there is an error, adding a report to the page
my $op = $query->param('op') || 'noop';
$template->param( language => 1 );
my $checkmodule = 1;
$template->param( 'checkmodule' => 1 )
; # we start with the assumption that there are no problems and set this to 0 if there are
unless ( $] >= 5.010000 ) { # Bug 7375
$template->param( problems => 1, perlversion => 1, checkmodule => 0 );
$checkmodule = 0;
}
my $perl_modules = C4::Installer::PerlModules->new;
@ -102,7 +104,6 @@ if ( $step && $step == 1 ) {
my $modules = $perl_modules->get_attr('missing_pm');
if ( scalar(@$modules) ) {
my @components = ();
my $checkmodule = 1;
foreach (@$modules) {
my ( $module, $stats ) = each %$_;
$checkmodule = 0 if $stats->{'required'};

Loading…
Cancel
Save