Bug 6914 - koha_perl_deps.pl color option changes user's shell prompt
Summary: koha_perl_deps.pl color option changes user's shell prompt
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: 3.6
Hardware: All Linux
: PATCH-Sent (DO NOT USE) minor (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
Depends on:
Reported: 2011-09-25 22:51 UTC by Greg Barniskis
Modified: 2013-12-05 19:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:

proposed 6914 patch (1.39 KB, patch)
2011-09-25 23:31 UTC, Greg Barniskis
Details | Diff | Splinter Review
patch attempt 2 (1.53 KB, patch)
2011-09-26 16:26 UTC, Greg Barniskis
Details | Diff | Splinter Review
Bug 6914 - fixes for the color option of koha_perl_deps.pl (1.42 KB, patch)
2011-12-02 07:43 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Barniskis 2011-09-25 22:51:57 UTC
This is a repeatable bug on a stock Debian squeeze fresh install with default Terminal settings (black text on white background). Simply run

perl koha_perl_deps.pl -a -c

The script's assertion of 'bold white' affects the Terminal shell prompt, which on default Terminal settings makes it white on white, a.k.a. suboptimal.

A correction is proposed in two parts. First, use blue not white for the header and footer, as this should render fine for both default Terminal settings and for those workers who prefer light text on a dark background. Second, at the end of the utility we should return the shell to the condition we found it in regardless of report color settings. This seems to do it:

print color 'reset' if $color;

I will submit a patch shortly.
Comment 1 Greg Barniskis 2011-09-25 23:31:20 UTC Comment hidden (obsolete)
Comment 2 Greg Barniskis 2011-09-26 15:09:48 UTC
Comment on attachment 5584 [details] [review]
proposed 6914 patch

The first patch file attached here (2011-09-25 23:31 UTC) is flawed because I was more intent on learning git commands and work flow than the code. The 'reset' should be after the footer print line. Sorry, I will send a corrected patch.
Comment 3 Greg Barniskis 2011-09-26 16:26:41 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2011-12-02 07:43:31 UTC
Created attachment 6511 [details] [review]
Bug 6914 - fixes for the color option of koha_perl_deps.pl

Reset the terminal color mode after reporting (to avoid polluting the
user's shell), and use blue instead of white for the report header and

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 5 Ian Walls 2011-12-02 13:51:06 UTC
affects koha_perl_deps.pl only, which is primarily only used turning install or trouble shooting.  just changes colors, which are entirely cosmetic.  Marking as Passed QA
Comment 6 Paul Poulain 2011-12-03 06:48:27 UTC
patch pushed, please test
Comment 7 Jared Camins-Esakov 2012-05-23 12:16:41 UTC
Included in 3.6 prior to 3.6.5.