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

Bug 483240

Summary: [Future EAPI] Disallow output of einfo and friends to stdout
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Severity: normal CC: esigra, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: in-eapi-7
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-01 06:47:49 UTC
Outputting those information messages to stdout is confusing and may result in unexpected issues when the commands are used in functions called through $().

It can supposedly be worked around by doing:

  einfo "Foo barring..." >&2

but this looks really bad.

IMO we should simply ban sending informational output to stdout in the next EAPI.
Comment 1 SpanKY gentoo-dev 2013-09-03 02:22:21 UTC
einfo does not show warnings.  if you're capturing the output of portage commands, then those calling einfo and mixing their output generally means they're already incorrectly written.  making einfo write to stderr doesn't really fix that ...
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-21 14:21:55 UTC
This is meant to make it possible to output QA warnings and die properly inside $() blocks. I don't see your comment adding anything to the topic.
Comment 3 Larry the Git Cow gentoo-dev 2018-03-04 21:05:08 UTC
The bug has been referenced in the following commit(s):

commit 2b62104633008cc30df24808029430516a6d9a7b
Author:     Michał Górny <>
AuthorDate: 2017-09-21 14:24:23 +0000
Commit:     Michał Górny <>
CommitDate: 2018-03-04 21:03:52 +0000 Ensure informational command output to stderr
    Ensure that einfo, elog, ewarn... commands direct all output to stderr
    consistently. This ensures that various logging messages won't pollute
    stdout, and therefore be accidentally caught in $().
    This satisfies the 'output commands do not pollute' stdout requirement
    that is tentatively included in EAPI 7.

 bin/ | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)}
Comment 4 Larry the Git Cow gentoo-dev 2018-04-30 22:14:49 UTC
The bug has been referenced in the following commit(s):

commit 55afad74bfa1592fd8cc1be38fc542777507129e
Author:     Michał Górny <>
AuthorDate: 2017-09-28 14:10:20 +0000
Commit:     Ulrich Müller <>
CommitDate: 2018-03-31 15:30:43 +0000

    EAPI 7 disallows stdout output of output functions

 eapi-differences.tex |  4 ++++
 pkg-mgr-commands.tex | 22 ++++++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)}