From 8dda84df3716c069c4afab8ea54bd1111520ba36 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 24 Jul 2026 06:04:19 +0000 Subject: [PATCH] Bug 43159: Restore localisation of PERL5LIB and KOHA_HOME This change localises PERL5LIB and KOHA_HOME, which means that any changes made to PERL5LIB or KOHA_HOME within _do_instance() in koha-plack are confined to the specific instance being worked on in that function. See Bugzilla for steps on how to reproduce the problem. Test plan: - Apply the patch - sudo vi debian/scripts/koha-plack Within _do_instance after PERL5LIB is set, add the following: echo $PERL5LIB - sudo koha-create --request-db test1 - sudo ./debian/scripts/koha-plack --restart test1 test1 test1 test1 - Note that now PERL5LIB stays constant: /usr/share/koha/lib:/usr/share/koha/installer:/usr/share/koha/lib/installer - git restore debian/scripts/koha-plack Signed-off-by: David Nind Signed-off-by: Laura_Escamilla Signed-off-by: Lucas Gass --- debian/scripts/koha-plack | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack index 9a31d419e4..ee3586dbb2 100755 --- a/debian/scripts/koha-plack +++ b/debian/scripts/koha-plack @@ -367,6 +367,12 @@ set_action() _do_instance() { local name=$1 + #NOTE: It's very important that PERL5LIB and KOHA_HOME are local + # By being local, we keep the PERL5LIB and KOHA_HOME specific + # to the instance that we're working on right now. + # If you disagree, please look at BZ 25778 and BZ 43159. + local PERL5LIB=$PERL5LIB + local KOHA_HOME=$KOHA_HOME adjust_paths_git_install $name PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer