Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 814656

Summary: sys-apps/portage-3.0.20-r6 : emerge does not disable color when stdout is not a tty
Product: Portage Development Reporter: Eric F. GARIOUD <eric-f.garioud>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: minor CC: gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=782910
Whiteboard:
Package list:
Runtime testing required: ---

Description Eric F. GARIOUD 2021-09-24 22:33:07 UTC
man emerge tells that :

"by default, color is disabled unless stdout is a tty"

It does not seem to be the case as :

emerge -p --deep --update --changed-use world > whatever
od -cx whatever 
0000000  \n 033   [   3   2   m   T   h   e   s   e       a   r   e

Straight from the beginning and all along the output, one can recognize the escape sequences used to colorize.

Not a big annoyance per se apart from the fact that this breaks genlop

emerge -p --deep --update --changed-use world | genlop -p
!!! Error: no pretended packages found.

Not itself a big annoyance apart from the time needed to wonder why and apply an easy workaround :

emerge -p --deep --update --changed-use --color n world | genlop -p

Reproducible: Always