Bug 6914

Summary: koha_perl_deps.pl color option changes user's shell prompt
Product: Koha Reporter: Greg Barniskis <gbarniskis>
Component: Installation and upgrade (command-line installer)Assignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: chris, koha.sekjal, paul.poulain
Version: 3.6   
Hardware: All   
OS: Linux   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: proposed 6914 patch
patch attempt 2
Bug 6914 - fixes for the color option of koha_perl_deps.pl

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
footer.

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.