@@ -, +, @@ process --------- NOTE: This could be ANY required library. I chose PDF::FromHTML, because it has been a thorn in my side. -- Blows up on redirect to log in. I used sudo dpkg -i /path/to/libpdf-fromhtml-perl...) PDF::FromHTML required. See also bug 14103. -- Proceeds as expected now. --- C4/Auth.pm | 2 +- installer/install.pl | 19 ++++++++++--------- .../intranet-tmpl/prog/en/modules/installer/step1.tt | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 11 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -671,7 +671,7 @@ sub _version_check { my $warning = "Database update needed, redirecting to %s. Database is $version and Koha is $kohaversion"; if ( $type ne 'opac' ) { warn sprintf( $warning, 'Installer' ); - print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3"); + print $query->redirect("/cgi-bin/koha/installer/install.pl?step=1&op=updatestructure"); } else { warn sprintf( "OPAC: " . $warning, 'maintenance' ); print $query->redirect("/cgi-bin/koha/maintenance.pl"); --- a/installer/install.pl +++ a/installer/install.pl @@ -53,9 +53,10 @@ my $dbh = DBI->connect( ); if ( $step && $step == 1 ) { - #First Step + #First Step (for both fresh installations and upgrades) #Checking ALL perl Modules and services needed are installed. #Whenever there is an error, adding a report to the page + my $op = $query->param('op') || 'noop'; $template->param( language => 1 ); $template->param( 'checkmodule' => 1 ); # we start with the assumption that there are no problems and set this to 0 if there are @@ -84,7 +85,7 @@ if ( $step && $step == 1 ) { ); } @components = sort {$a->{'name'} cmp $b->{'name'}} @components; - $template->param( missing_modules => \@components, checkmodule => $checkmodule ); + $template->param( missing_modules => \@components, checkmodule => $checkmodule, op => $op ); } } elsif ( $step && $step == 2 ) { @@ -312,13 +313,13 @@ elsif ( $step && $step == 3 ) { # #Do updatedatabase And report - if ( ! defined $ENV{PERL5LIB} ) { - my $find = "C4/Context.pm"; - my $path = $INC{$find}; - $path =~ s/\Q$find\E//; - $ENV{PERL5LIB} = "$path:$path/installer"; - warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n"; - } + if ( ! defined $ENV{PERL5LIB} ) { + my $find = "C4/Context.pm"; + my $path = $INC{$find}; + $path =~ s/\Q$find\E//; + $ENV{PERL5LIB} = "$path:$path/installer"; + warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n"; + } my $now = POSIX::strftime( "%Y-%m-%dT%H:%M:%S", localtime() ); my $logdir = C4::Context->config('logdir'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt @@ -30,7 +30,9 @@ listed, please inform your systems administrator.

[% END %] [% IF ( language ) %] - [% UNLESS ( checkmodule ) %] + [% IF ( checkmodule ) %] +

All required Perl modules appear to be installed.
+ [% ELSE %] [% IF ( missing_modules ) %]

Some Perl modules are missing. Modules in red must be installed before you may continue.