[Bug 43675] New: Web installer shows a blank Installed version for outdated Perl modules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43675 Bug ID: 43675 Summary: Web installer shows a blank Installed version for outdated Perl modules Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Target Milestone: --- When a required Perl module is installed but below the minimum version Koha needs, the web installer's "Check Perl dependencies" step (installer/install.pl step 1) correctly blocks progress, but the "Installed version:" field on that page is always blank, regardless of what is actually installed. Only "Minimum version:" and "Maximum version:" are populated. For example, with PDF::Reuse 0.39 installed (Koha on this branch requires 0.43, see Bug 41717), the page shows: PDF::Reuse Required Installed version: Minimum version: 0.43 Maximum version: Root cause: installer/install.pl builds the @upgrade array passed to the template with name, min_version, max_version and require, but never includes the installed version (available as cur_ver from C4::Installer::PerlModules::versions_info), even though koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt already expects and displays upgrade_module.version. This patch moves the missing/upgrade module list building (and the checkmodule blocking logic) out of install.pl and into a new C4::Installer::PerlModules::modules_report method, which now includes the installed version for upgrade_pm entries. install.pl becomes a thin caller of this method. This also makes the logic unit-testable, which it was not before (install.pl is a top-level CGI script with side effects, so it could not be exercised directly in a test). Test plan: 1. Apply the patch 2. prove t/Installer_PerlModules.t -- confirm the new modules_report subtest passes, including the 'Installed version of the outdated module is reported' assertion 3. In a KTD instance with an outdated required Perl module (e.g. an older PDF::Reuse than the cpanfile requires), go through the web installer and reach the "Check Perl dependencies" step 4. Confirm the "Installed version:" field for the outdated module now shows the actual installed version instead of being blank 5. Confirm the page still correctly blocks progress (no "Continue" button) when a required module fails the check, same as before -- 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=43675 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 207016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207016&action=edit Bug 43675: Report the installed version for outdated Perl modules When a required Perl module is installed but below the minimum version Koha needs, the web installer's "Check Perl dependencies" step correctly blocks progress, but the "Installed version:" field on that page is always blank, regardless of what is actually installed. Only "Minimum version:" and "Maximum version:" are populated. installer/install.pl built the @upgrade array passed to the template with name, min_version, max_version and require, but never included the installed version (available as cur_ver from C4::Installer::PerlModules::versions_info), even though koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt already expects and displays upgrade_module.version. This patch moves the missing/upgrade module list building (and the checkmodule blocking logic) out of install.pl and into a new C4::Installer::PerlModules::modules_report method, which now includes the installed version for upgrade_pm entries. install.pl becomes a thin caller of this method. This also makes the logic unit-testable, which it was not before (install.pl is a top-level CGI script with side effects, so it could not be exercised directly in a test). Test plan: 1. Apply the patch 2. prove t/Installer_PerlModules.t -- confirm the new modules_report subtest passes, including the 'Installed version of the outdated module is reported' assertion 3. In a KTD instance with an outdated required Perl module (e.g. an older PDF::Reuse than the cpanfile requires), go through the web installer and reach the "Check Perl dependencies" step 4. Confirm the "Installed version:" field for the outdated module now shows the actual installed version instead of being blank 5. Confirm the page still correctly blocks progress (no "Continue" button) when a required module fails the check, same as before Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- 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=43675 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff -- 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=43675 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=43675 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43675 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Did you try the failing selenium tests? How do they behave now? Do they fail with a meaningful error? (Sorry I cannot test right now) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43675 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43706 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- So I've tried and I still get the (In reply to Jonathan Druart from comment #2)
Did you try the failing selenium tests? How do they behave now? Do they fail with a meaningful error?
(Sorry I cannot test right now)
I have opened bug 43706 for this problem (the dependency not satisfied). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43706 [Bug 43706] Installer and onboarding selenium tests must fail with meaningful error if deps are not satisfied -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43675 Jonathan Druart <jonathan.druart@gmail.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=43675 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207016|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=43675 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 207205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207205&action=edit Bug 43675: Report the installed version for outdated Perl modules When a required Perl module is installed but below the minimum version Koha needs, the web installer's "Check Perl dependencies" step correctly blocks progress, but the "Installed version:" field on that page is always blank, regardless of what is actually installed. Only "Minimum version:" and "Maximum version:" are populated. installer/install.pl built the @upgrade array passed to the template with name, min_version, max_version and require, but never included the installed version (available as cur_ver from C4::Installer::PerlModules::versions_info), even though koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt already expects and displays upgrade_module.version. This patch moves the missing/upgrade module list building (and the checkmodule blocking logic) out of install.pl and into a new C4::Installer::PerlModules::modules_report method, which now includes the installed version for upgrade_pm entries. install.pl becomes a thin caller of this method. This also makes the logic unit-testable, which it was not before (install.pl is a top-level CGI script with side effects, so it could not be exercised directly in a test). Test plan: 1. Apply the patch 2. prove t/Installer_PerlModules.t -- confirm the new modules_report subtest passes, including the 'Installed version of the outdated module is reported' assertion 3. In a KTD instance with an outdated required Perl module (e.g. an older PDF::Reuse than the cpanfile requires), go through the web installer and reach the "Check Perl dependencies" step 4. Confirm the "Installed version:" field for the outdated module now shows the actual installed version instead of being blank 5. Confirm the page still correctly blocks progress (no "Continue" button) when a required module fails the check, same as before Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org