Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eerror and ewarn print to stdout #9

Closed
marineam opened this issue Apr 28, 2015 · 8 comments
Closed

eerror and ewarn print to stdout #9

marineam opened this issue Apr 28, 2015 · 8 comments

Comments

@marineam
Copy link
Contributor

In openrc eerror and ewarn print to stderr instead of stdout and some code expects that behavior. For example toolchain.eclass assumes gcc-config only prints valid output to stdout, but when errors with the * prefix are mixed into stdout odd things strike: https://bugs.gentoo.org/show_bug.cgi?id=547962

In the original baselayout-1 it appears eerror and ewarn usually used stdout but personally I favor the openrc behavior.

@marineam
Copy link
Contributor Author

Actually, it looks like the newer gentoo-functions has returned to the baselayout-1 behavior of logging all levels to stdout by default. https://github.com/gentoo/gentoo-functions/blob/master/functions.sh#L190

@marcus-downing
Copy link
Owner

I followed the behaviour of the Gentoo I had to hand, but there are times I would prefer them to log to syserr instead. Aside from compatibility, do you have a preference?

@marineam
Copy link
Contributor Author

No preference, I initially favored the openrc behavor until I realized that gentoo-functions, which is what Gentoo is migrating to, goes back to using stdout by default. So although the current behavior is different from openrc it does match the implementation that came before and after openrc.

Closing since it seems fine as-is but worth revisiting if gentoo-functions ever switches to the openrc behavor.

@marineam
Copy link
Contributor Author

Opened https://bugs.gentoo.org/show_bug.cgi?id=548158 for gentoo-functions. Will see what they decide to do.

@marcus-downing
Copy link
Owner

I'll be interested to see what they pick. stderr does probably make more sense.

@marcus-downing
Copy link
Owner

Was a decision made on this? I can see that the issue is marked as resolved. Did it reach a real Gentoo release?

@marineam
Copy link
Contributor Author

Sorry, forgot to update. gentoo-functions now uses stderr for warn/error: https://github.com/gentoo/gentoo-functions/pull/4/files

@marineam marineam reopened this Jul 17, 2015
@marcus-downing
Copy link
Owner

Good enough for me. I've just pushed 811f336 to switch all output to stderr. It does feel like the right thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants