[Bug 5599] New: koha_perl_deps.pl and PerlDependencies.pm don't compare $VERSION numbers correctly
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5599 Summary: koha_perl_deps.pl and PerlDependencies.pm don't compare $VERSION numbers correctly Change sponsored?: --- Product: Koha Version: HEAD Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Installation and upgrade (command-line installer) AssignedTo: gmcharlt@gmail.com ReportedBy: ohiocore@gmail.com QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 Normal perl $VERSION numbers are not string sortable/comparable. This is because they do not use leading zeroes or static numbers of digits for each part. But our logic in C4/Installer/PerlModules.pm relies on string comparison, so it does not regard 1.3.12 as being greater than 1.3.5, when in reality it is 7 iterations later. Example: $ ./koha_perl_deps.pl -u Module Name Current Version Required Version Module Required -------------------------------------------------------------------------------------------------------------------------- Graphics::Magick 1.3.12 * 1.3.5 No -------------------------------------------------------------------------------------------------------------------------- Total modules reported: 1 * Module is missing or requires an upgrade. Specifically, these comparisons from lines 75 and 89 of C4/Installer/PerlModules.pm are incorrect: $params{'module'}->VERSION lt $PERL_DEPS->{$params{'module'}}->{'min_ver'} ... $pkg->VERSION lt $PERL_DEPS->{$_}->{'min_ver'} I don't like the approach used by PerlModules.pm because the code is overwrought and it tries to reproduce core perl logic. The definitive test would rely on, for example, $pkg->VERSION($min) since VERSION() is a part of UNIVERSAL and it actually understands perl's lax version strings (and always will, even if they change format). We can access that via UNIVERSAL::require($min). -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5599 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cnighswonger@foundations.ed | |u AssignedTo|gmcharlt@gmail.com |cnighswonger@foundations.ed | |u -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5599 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12790 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5599 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #1 from Marc Véron <veron@veron.ch> --- I submitted patch for Bug 12790. It displays required version numbers on the 'About page. This way we can verify the required vs. installed version numbers without diving into the scripts. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5599 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor CC| |jonathan.druart@biblibre.co | |m --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- The issue raised by the description is now fixed commit 80ba84159ddbdd52394984c8078263066dcc7a7b Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Thu Jul 21 20:04:02 2011 +1200 Fixing missing padding on module version - 'min_ver' => '1.3.5' + 'min_ver' => '1.3.05' So it's not needed at the moment. I decrease the priority. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org