[Bug 13217] New: fix koha-upgrade-schema to work with git/dev installs
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Bug ID: 13217 Summary: fix koha-upgrade-schema to work with git/dev installs Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: mtj@kohaaloha.com QA Contact: testopia@bugs.koha-community.org koha-upgrade-schema seems to currently not work with git/dev koha-gitify installs this patch attempts to fix this issue -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 --- Comment #1 from Mason James <mtj@kohaaloha.com> --- here's an example of a failed attempt... # koha-create --create-db master # koha-gitify master /path/to/my/koha # apachectl restart # koha-upgrade-schema -v master Upgrading database schema for -v unable to locate Koha configuration file koha-conf.xml at /usr/share/koha/lib/C4/Context.pm line 373. unable to locate Koha configuration file koha-conf.xml at /usr/share/koha/lib/C4/Context.pm line 373. unable to locate Koha configuration file koha-conf.xml at /usr/share/koha/lib/C4/Context.pm line 373. Can't call method "config" on unblessed reference at /usr/share/koha/lib/C4/Context.pm line 796. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 --- Comment #2 from Mason James <mtj@kohaaloha.com> ---
# koha-upgrade-schema -v master Upgrading database schema for -v
oops, typo ^ root@xen1:~# sh -x /usr/sbin/koha-upgrade-schema master + set -e + update=/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl + echo Upgrading database schema for master Upgrading database schema for master + KOHA_CONF=/etc/koha/sites/master/koha-conf.xml PERL5LIB=/usr/share/koha/lib /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl this is a similar issue to 13216, where PERL5LIB is assumed be '/usr/share/koha' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15012 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15012 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13216 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'd like to say that gitified instance issues should be handled outside Koha... With that in mind, I'd say the best approach to this is to make the scripts (all of them?) - Test for PERL5LIB be defined (so we can make koha-gitify wrap things or... we'll solve it) - Otherwise fallback to the system-wide one that is set in /etc/default/koha-common So maintenance scripts should do something like this: # include helper functions if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then . "/usr/share/koha/bin/koha-functions.sh" else echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 exit 1 fi Ok, most of them do it already. And then add to koha-functions.sh the check+read: if [ ! -z $PERL5LIB ]; then CLI_PERL5LIB=$PERL5LIB fi if [ -r /etc/default/$NAME ]; then # Debian / Ubuntu . /etc/default/$NAME elif [ -r /etc/sysconfig/$NAME ]; then # RedHat / SuSE . /etc/sysconfig/$NAME fi if [ ! -z $CLI_PERL5LIB ]; then PERL5LIB=$CLI_PERL5LIB fi -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217 Chris Kirby <christopherlawrencekirby@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christopherlawrencekirby@gm | |ail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org