Efflux: Avoid generating error logs by installer.pl #583
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
The installer.pl generates numerous error messages during the installation of Znuny – even if everything works fine. This PR tries to eliminate some/most of them.
Type of change
Additional information
Kernel/Modules/Installer.pm:
PrintError
makes sure failed database calls don't get handled by Perl (→ the web server). Every major error will either get directly shown to the user via$DBI::errstr
or there is an existing translation message attached to it. Just by checking that the database is empty (by checking if thevalid
table exists), an error message gets created. Most of the other checks will also get logged as errors.Kernel/System/Package.pm:
var/packages
will most likely not exist on > 95% of the installed systems. The subroutine does currently not check if the directory exists and throws an error.Kernel/Output/HTML/Layout.pm: Both subroutines that got wrapped into the
InstallerOnly
check, make direct calls to the database, which does not exist yet (or at least shouldn't).InstallerOnly
doesn't get used anywhere else, but it feels like this is a perfect use for it.I don't think internal checks should write error messages to the log. This might give the wrong (first) impression that something went wrong or could have been done better.
Checklist