Gentoo Archives: gentoo-dev

From: Todd Heim <heim-gentoo@××××××××.net>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] output from qpkg / gentoolkit without ESC codes
Date: Sat, 15 Mar 2003 07:26:05
Message-Id: 20030315072604.GA26717@tnt.heim.cjb.net
In Reply to: Re: [gentoo-dev] output from qpkg / gentoolkit without ESC codes by Joseph Carter
1 On Fri, Mar 14, 2003 at 11:24:18AM -0800, Joseph Carter wrote:
2 > On Fri, Mar 14, 2003 at 11:42:32AM +0100, Tim Ruehsen wrote:
3 > > I redirected output from 'qpkg' into a file. Now it contains these ESC color
4 > > codes (that might are nice on a console). How do I switch ESC codes off?
5 >
6 > Part of the problem with the colors is that Gentoo does not read the
7 > terminfo database for the current terminal type to determine whether or
8 > not color codes are supported or how to display them. Not all of the
9 > Gentoo tools check where stdout is going either.
10
11 You're right about not checking where output is going.. one thing Ive noticed recently is runscript (used by init scripts)
12 doesn't even have a way to control colors via -nc. Only recently has this become something to think about, as I recently
13 bought a wireless card. now when inserting the wireless card it logs the output from /etc/init.d/net.eth1 start into the
14 system logs, color codes and all.
15
16 example:
17 Mar 12 03:28:03 [cardmgr] executing: './network start eth1'
18 Mar 12 03:28:04 [cardmgr] + [32;01m* [0m Bringing eth1 up...
19 Mar 12 03:28:08 [cardmgr] + [A [-7G [34;01m[ [32;01mok [34;01m] [0m
20 Mar 12 03:28:08 [cardmgr] exiting
21
22 I looked over runscript.sh, and it looks easy enough to keep it from outputting color; just unset all the variables where teh
23 color codes are defined.
24
25
26 http://bugs.gentoo.org/show_bug.cgi?id=17542 (/me finally posted this to bugzilla)
27
28
29 --
30 Todd Heim
31 http://theim.net
32
33 --
34 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] output from qpkg / gentoolkit without ESC codes Paul de Vrieze <gentoo-user@××××××××.net>