FS#8145 - makepkg : invisible messages on white backgrounds
Attached to Project:
Pacman
Opened by Xavier (shining) - Thursday, 27 September 2007, 17:05 GMT
Last edited by Dan McGee (toofishes) - Friday, 28 September 2007, 23:40 GMT
Opened by Xavier (shining) - Thursday, 27 September 2007, 17:05 GMT
Last edited by Dan McGee (toofishes) - Friday, 28 September 2007, 23:40 GMT
|
Details
Summary and Info:
It seems makepkg 3.1 (git version) doesn't use the foreground color anymore for its output. So even on a white background, it'll still display in white, resulting in invisible messages. Steps to Reproduce: For example, just run makepkg in a directory without PKGBUILD, with a dark on white terminal. The "PKGBUILD does not exist." part is invisible. But this also applies to many other messages displayed by makepkg, for examples the ones before/after building. |
This task depends upon
Closed by Dan McGee (toofishes)
Friday, 28 September 2007, 23:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed for real in GIT? I hope so.
Friday, 28 September 2007, 23:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed for real in GIT? I hope so.
So I'm just attaching this section, cut from a diff -U (ie an invalid patch), since the rest should be irrelevant. Let me know if this was stupid :)
Note most of the escapes went from:
\033[1;1m
to
\033[1;37m
The first param is the attributes (1 = bold), the second is the color, with all standard colors in the range 30-37 (bold and non-bold).
1 and 0 are special, meaning foreground and background - so 1;1m == bold foreground color and 1;37m == bold white.
Problem solved 8)
http://code.phraktured.net/?p=pacman.git;a=commitdiff;h=3755f589c51e0c57efb9fddb17a20a7b8b6dfac2
Previously, it was done like this :
echo -e "\033[1;31m==> ERROR:\033[1;0m \033[1;1m$1\033[1;0m" >&2
Why are so many color codes needed to work correctly?
Ok ok, another one for tonight.... /me sighs
I don't quite understand what was wrong, but it doesn't matter.