Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170868 - Please add --nocolor option to eix-sync
Summary: Please add --nocolor option to eix-sync
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-14 13:15 UTC by Rick Morra
Modified: 2007-04-06 00:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Morra 2007-03-14 13:15:11 UTC
The eix-sync command in app-portage/eix-0.8.8 does not have the --nocolor option available to the eix command: `eix-sync --nocolor` returns the help screen.

I run eix-sync as a cron job with the output mailed to me. My mail reader muddles the color escape sequences.

Reproducible: Always
Comment 1 Martin Väth 2007-03-14 17:41:10 UTC
(In reply to comment #0)
> I run eix-sync as a cron job with the output mailed to me. My mail reader
> muddles the color escape sequences.

This is strange. If you redirect the output (i.e. if the output-device is not a tty) eix *automatically* switches off the colors unless you have changed the default of FORCE_USECOLORS. To make sure that the latter is really not set, you can temporarily add it to the environment. In my test,
   FORCE_USECOLORS=false eix-sync -d |cat
does not output any colors (although I have changed the default of FORCE_USECOLORS in my personal /etc/eixrc).
Comment 2 Rick Morra 2007-03-15 12:21:09 UTC
(In reply to comment #1)

Did some more investigating. My cron mailing is indeed the color-free output of eix-sync. However, the nocolor output of eix-sync seems to only suppress the codes that turn on color output. The codes that that return to uncolored text (hex '1b 5b 30 6d') are still included in the output. That escape sequence is what is muddling my mail.

To see this try `eix-sync -d | vim -`, or redirect the output `eix-sync -d` to a file and view the file with hexdump.

So I would change my feature request to removing ALL color escape sequences from uncolored eix output.
Comment 3 Martin Väth 2007-03-15 14:22:07 UTC
Thanks for reporting. The bug is fixed in eix current svn trunk (eix-0.9.2).
Comment 4 Rick Morra 2007-03-16 14:46:08 UTC
Thanks for fixing it.
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2007-04-06 00:45:09 UTC
eix-0.9.2 is in tree.