[Bug 17986] New: Perl dependency evaluation incorrect
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Bug ID: 17986 Summary: Perl dependency evaluation incorrect Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org While I was fixing Bug 17880, I mistakenly created a new bug via a copy/paste error. At the moment, if you run koha_perl_deps.pl -a -c, or go to /cgi-bin/koha/about.pl and click on Perl modules, most installed modules will be coloured yellow indicating they need an upgrade. The fix is a simple one line change, but will help solve a lot of headaches and confusion over people trying to meet dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17880 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 59535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59535&action=edit Bug 17986 - Perl dependency evaluation incorrect It looks like I made a copy/paste error in a previous patch. While the fix was working when you pass the param "module" to version_info, it wasn't populating the version correctly for the "all" param, which causes koha_perl_deps.pl to think all OK modules actually need an upgrade. TEST PLAN 0) Be on a system where you know your Koha Perl dependencies are mostly up-to-date 1) Run ./koha_perl_deps.pl -a -c 2) Note that most modules say they need an upgrade even when the installed version is the same as the minimum version 3) Apply patch 4) Run ./koha_perl_deps.pl -a -c 5) Note that most moduls say they're OK, especially when the installed version is the same or greater than the minimum version https://bugs.koha-community.org/show_bug.cgi?id=17880 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59535|0 |1 is obsolete| | --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 59536 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59536&action=edit Bug 17986 - Perl dependency evaluation incorrect It looks like I made a copy/paste error in a previous patch. While the fix was working when you pass the param "module" to version_info, it wasn't populating the version correctly for the "all" param, which causes koha_perl_deps.pl to think all OK modules actually need an upgrade. TEST PLAN 0) Be on a system where you know your Koha Perl dependencies are mostly up-to-date 1) Run ./koha_perl_deps.pl -a -c 2) Note that most modules say they need an upgrade even when the installed version is the same as the minimum version 3) Apply patch 4) Run ./koha_perl_deps.pl -a -c 5) Note that most moduls say they're OK, especially when the installed version is the same or greater than the minimum version https://bugs.koha-community.org/show_bug.cgi?id=17880 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- TEST PLAN alternative Instead of running koha_perl_deps.pl, you can visit /cgi-bin/koha/about.pl and click on "Perl modules". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|critical |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 jesus@medios.es changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesus@medios.es --- Comment #4 from jesus@medios.es --- Packaged koha-kommon included in Debian Wheezy seems to be affected by this bug. Upgrades to koha-kommon 16.05.05 package fail complaining of perl "virtual packages" unmet dependencies. Will this patch be commited to 16.11 or shall we wait to 17.05? Best, Jesus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=17986 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59536|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 59538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59538&action=edit Bug 17986: Perl dependency evaluation incorrect It looks like I made a copy/paste error in a previous patch. While the fix was working when you pass the param "module" to version_info, it wasn't populating the version correctly for the "all" param, which causes koha_perl_deps.pl to think all OK modules actually need an upgrade. TEST PLAN 0) Be on a system where you know your Koha Perl dependencies are mostly up-to-date 1) Run ./koha_perl_deps.pl -a -c 2) Note that most modules say they need an upgrade even when the installed version is the same as the minimum version 3) Apply patch 4) Run ./koha_perl_deps.pl -a -c 5) Note that most moduls say they're OK, especially when the installed version is the same or greater than the minimum version Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Running koha_perl_deps.pl -u convinced me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17880 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 [Bug 17880] C4::Installer::PerlModules lexicographical comparison is incorrect -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59544&action=edit Bug 17986: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am stuck, I tried to provide tests to highlight the problem, but I do not manage to make them fail. There is something wrong in the code: It seems that the same code is duplicated: if ( $params{module} ) { do something; } else { do almost the same thing; } Except that in the first block, $_ is used, but is always undefined (not in a loop). This code sounds ugly and buggy, it may be good to fix it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #7)
I am stuck, I tried to provide tests to highlight the problem, but I do not manage to make them fail. There is something wrong in the code: It seems that the same code is duplicated: if ( $params{module} ) { do something; } else { do almost the same thing; }
Except that in the first block, $_ is used, but is always undefined (not in a loop). This code sounds ugly and buggy, it may be good to fix it.
Yeah. I saw the code; it is horrible. But this seems to fix at least one issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Ok, I am rewriting it, will move that to another bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59538|0 |1 is obsolete| | Attachment #59544|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59545&action=edit Bug 17986: Perl dependency evaluation incorrect It looks like I made a copy/paste error in a previous patch. While the fix was working when you pass the param "module" to version_info, it wasn't populating the version correctly for the "all" param, which causes koha_perl_deps.pl to think all OK modules actually need an upgrade. TEST PLAN 0) Be on a system where you know your Koha Perl dependencies are mostly up-to-date 1) Run ./koha_perl_deps.pl -a -c 2) Note that most modules say they need an upgrade even when the installed version is the same as the minimum version 3) Apply patch 4) Run ./koha_perl_deps.pl -a -c 5) Note that most moduls say they're OK, especially when the installed version is the same or greater than the minimum version Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Running koha_perl_deps.pl -u convinced me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17990 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17990 [Bug 17990] Code to check perl module versions is buggy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #9)
Ok, I am rewriting it, will move that to another bug report.
See bug 17990. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #11)
(In reply to Jonathan Druart from comment #9)
Ok, I am rewriting it, will move that to another bug report.
See bug 17990.
You're a champ, Jonathan! I have another two reports* that looks at fixing issues with this code, so cheers for rewriting it overall. *bug 17882 *bug 17887 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks David! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Much better. This patch has been pushed to 16.11.x and will be in 16.11.03. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #15 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.09 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17880 Depends on|17880 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 [Bug 17880] C4::Installer::PerlModules lexicographical comparison is incorrect -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17880 Blocks|17880 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 [Bug 17880] C4::Installer::PerlModules lexicographical comparison is incorrect -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18798 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18798 [Bug 18798] Use Koha.Preference in OPAC Reading Record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|18798 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18798 [Bug 18798] Use Koha.Preference in OPAC Reading Record -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org