[Koha-bugs] [Bug 13217] fix koha-upgrade-schema to work with git/dev installs

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 22 05:14:36 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13217

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomascohen at gmail.com

--- Comment #3 from Tomás Cohen Arazi <tomascohen at 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.


More information about the Koha-bugs mailing list