[Bug 43159] New: Regression to @INC handling by bug 39740 undoing bug 25778
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Bug ID: 43159 Summary: Regression to @INC handling by bug 39740 undoing bug 25778 Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Target Milestone: --- I think that bug 39740 accidentally created a regression by undoing the most important parts of bug 25778 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25778, 39740 Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25778 [Bug 25778] koha-plack puts duplicate entries into PERL5LIB when multiple instances named https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 [Bug 39740] [Follow-up of 36932] Split dev_install into git_install and debug_mode -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #1 from David Cook <dcook@prosentient.com.au> --- On https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740#c74 I ask: "Move export to do_instance, remove three local's" Marcel, do you recall why you removed those locals? Because they were important. -- The thing is... "export PERL5LIB KOHA_HOME GIT_INSTALL" really doesn't need to be in _do_instance(). The "export" simply marks those variables as being exported. It has nothing to do with their values. Sometimes, we do things like 'export PERL5OPT="-d"' which is just a short-hand of 'export PERL5OPT; PERL5OPT="-d";'. But that's not what the above does. So it was fine where it was previously. Running "export PERL5LIB KOHA_HOME GIT_INSTALL" in _do_instance() is just needless repetition. -- And the problem with removing the "local" keyword is that it means these variables are used globally, so KOHA_HOME and GIT_INSTALL will overwrite previous values, while PERL5LIB just grows and grows, as I describe in bug 25778. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- To reproduce: - sudo vi /usr/sbin/koha-plack Within _do_instance after PERL5LIB is set, add the following: echo $PERL5LIB - sudo koha-create --request-db test1 - sudo koha-plack --restart test1 test1 test1 test1 - Note that the PERL5LIB grows from this: /usr/share/koha/lib:/usr/share/koha/installer:/usr/share/koha/lib/installer To this: /usr/share/koha/lib:/usr/share/koha/installer:/usr/share/koha/lib/installer:/usr/share/koha/installer:/usr/share/koha/lib/installer:/usr/share/koha/installer:/usr/share/koha/lib/installer:/usr/share/koha/installer:/usr/share/koha/lib/installer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 202444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202444&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Note: This will affect versions 25.11+ since bug 39740 only affects those versions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|25.11 |unspecified CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_11_candidate, | |rel_26_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202444|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 202570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202570&action=edit 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 <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. When reproducing the problem, this is where I added echo $PERL5LIB: sudo vi /usr/sbin/koha-plack 368 _do_instance() { 369 local name=$1 370 371 adjust_paths_git_install $name 372 PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer ==> 373 echo $PERL5LIB -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Thanks, David :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m QA Contact|testopia@bugs.koha-communit |Laura.escamilla@bywatersolu |y.org |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202570|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #9 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 202739 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202739&action=edit 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 <david@davidnind.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- Thanks Laura :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43159 --- Comment #11 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org