Bugzilla – Attachment 9888 Details for
Bug 7857
database upgrade fails with plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7857 - database upgrade fails with plack
Bug-7857---database-upgrade-fails-with-plack.patch (text/plain), 2.05 KB, created by
Paul Poulain
on 2012-06-01 17:35:40 UTC
(
hide
)
Description:
Bug 7857 - database upgrade fails with plack
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-06-01 17:35:40 UTC
Size:
2.05 KB
patch
obsolete
>From 2f6b3e6f7db30ff621c4c7766dae66bdd2d557a9 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Fri, 30 Mar 2012 22:03:20 +0200 >Subject: [PATCH] Bug 7857 - database upgrade fails with plack > >Updating database structure > >Update errors : > > Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 .) at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. > BEGIN failed--compilation aborted at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. > >It seems that plack cleans enviroment, so we have to re-instart PERL5LIB >so script invocation won't fail. > >It also fixes exit 1 which fail with plack. > >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> >--- > installer/install.pl | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/installer/install.pl b/installer/install.pl >index 419273a..460a0c0 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -185,7 +185,7 @@ elsif ( $step && $step == 3 ) { > # we have finished, just redirect to mainpage. > # > print $query->redirect("/cgi-bin/koha/mainpage.pl"); >- exit 1; >+ exit; > } > elsif ( $op && $op eq 'finish' ) { > $installer->set_version_syspref(); >@@ -312,6 +312,15 @@ elsif ( $step && $step == 3 ) { > # Not 1st install, the only sub-step : update database > # > #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; >+ warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n"; >+ } >+ > my $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/updatedatabase.pl"; > my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = IPC::Cmd::run(command => $cmd, verbose => 0); > >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7857
:
8726
|
8729
|
8912
| 9888 |
10287
|
10345