[Bug 17880] New: C4::Installer:: PerlModules lexicographical comparison is incorrect
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Bug ID: 17880 Summary: C4::Installer::PerlModules lexicographical comparison is incorrect Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal 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 C4::Installer::PerlModules compares a modules VERSION against the min_version specified in C4::Installer::PerlDependencies using the lexicographical comparison "lt". This means that 0.9.12 will be considered to be less than 0.9.3: PDF::Table 0.9.12 0.9.3 Yes The above line shows up in koha_perl_deps.pl when I look to see what modules I need to upgrade. It doesn't prevent me from installing/running Koha, but it's wrong. In theory, we could use version.pm for our comparisons (http://search.cpan.org/~jpeacock/version-0.9917/lib/version.pod#How_to_compa...). I think it can sometimes have surprising results, although in this case it should be OK since we're comparing version numbers against version numbers of the same module. So in theory it should have a consistent scheme... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I've actually written a patch for this, but I found another bug in C4::Installer::PerlModules::version_info() while writing a unit test, so I'll open another bug for that... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17882 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17882 [Bug 17882] C4::Installer::PerlModules::version_info() drops data during error handling -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 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=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|17882 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17882 [Bug 17882] C4::Installer::PerlModules::version_info() drops data during error handling -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Removed the dependency on bug 17882 as they can actually be done separately... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #2)
Removed the dependency on bug 17882 as they can actually be done separately...
Although whichever one comes second will need to be rebased... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 58857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58857&action=edit Bug 17880 - Add test to check version number comparison -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Created attachment 58858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58858&action=edit Bug 17880 - Use version.pm to parse version numbers in C4::Installer::PerlModules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Test Plan: 1) Apply patch "Bug 17880 - Add test to check version number comparison" 2) Run "perl t/Installer_PerlModules.t" 3) Note the following output: not ok 19 - Version 0.9.13 is greater than 0.9.3, so no upgrade needed # Failed test 'Version 0.9.13 is greater than 0.9.3, so no upgrade needed' # at t/Installer_PerlModules.t line 51. # got: '1' # expected: '0' # Looks like you failed 1 test of 19. 4) Apply patch "Bug 17880 - Use version.pm to parse version numbers in C4::Installer::PerlModules" 5) Run "perl t/Installer_PerlModules.t" 6) Note the following output: ok 19 - Version 0.9.13 is greater than 0.9.3, so no upgrade needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58857|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 58998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58998&action=edit Bug 17880 - Add test to check version number comparison Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58858|0 |1 is obsolete| | --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 58999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58999&action=edit Bug 17880 - Use version.pm to parse version numbers in C4::Installer::PerlModules Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtompset@hotmail.com Keywords|Academy | --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Oops. Didn't notice the Academy until after I signed off. Thanks for fixing this. I remember hitting this problem with some actual Koha stuff while playing between OS's and versions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 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=17880 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58998|0 |1 is obsolete| | Attachment #58999|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59074 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59074&action=edit Bug 17880 - Add test to check version number comparison Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59075 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59075&action=edit Bug 17880 - Use version.pm to parse version numbers in C4::Installer::PerlModules Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ohiocore@gmail.com --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 5599 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vanoudt@gmail.com --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 16638 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #14 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=17880 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 #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.02. . -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- Ooops... it looks like I actually created a new bug while fixing that bug! The test works but I made a copy/paste error which means koha_perl_deps.pl now doesn't work correctly! I'm just about to attach a patch to fix that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #17 from David Cook <dcook@prosentient.com.au> --- Created attachment 59533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59533&action=edit Fix copy/paste error 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59533|0 |1 is obsolete| | --- Comment #18 from David Cook <dcook@prosentient.com.au> --- Created attachment 59534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59534&action=edit Bug 17880: Fix copy/paste error 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17986 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #19 from David Cook <dcook@prosentient.com.au> --- See Bug 17986 for a separate bug report and fix -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17986 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 [Bug 17986] Perl dependency evaluation incorrect -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Attachment #59534|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Comment on attachment 59534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59534 Bug 17880: Fix copy/paste error Deleting this patch here, since it is on a new report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #21 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.08 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #22 from Mason James <mtj@kohaaloha.com> --- (In reply to Mason James from comment #21)
Pushed to 16.05.x, for 16.05.08 release
Blocked by BZ-17986, skipping for 16.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17986 Blocks|17986 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 [Bug 17986] Perl dependency evaluation incorrect -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17880 --- Comment #23 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=17880 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17986 Depends on|17986 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17986 [Bug 17986] Perl dependency evaluation incorrect -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org