public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] pet peeve: sending normal output to stderr (env-update)
@ 2006-11-14 17:50 David Talkington
  2006-11-14 18:30 ` Glenn McCarthy
  2006-11-14 20:45 ` Richard Fish
  0 siblings, 2 replies; 9+ messages in thread
From: David Talkington @ 2006-11-14 17:50 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Why on earth does env-update send this:

>>> Regenerating /etc/ld.so.cache...

to stderr instead of stdout?  This makes it very difficult to see only 
abnormal output in a cron job.

I stopped using wget because of precisely that irritation.  I cannot for 
the life of me think of a good reason to do this.

- --
David Talkington

PGP key: http://www.prairienet.org/~dtalk/004B8F8B.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFWgIB5FKhdwBLj4sRAvR+AKCCNDISnN0SQZQTo3Piu3yCEoYP0QCfTZxD
7/sMMrJEkY91a5sw5VR3W5Q=
=ELRL
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] pet peeve: sending normal output to stderr (env-update)
  2006-11-14 17:50 [gentoo-user] pet peeve: sending normal output to stderr (env-update) David Talkington
@ 2006-11-14 18:30 ` Glenn McCarthy
  2006-11-14 20:45 ` Richard Fish
  1 sibling, 0 replies; 9+ messages in thread
From: Glenn McCarthy @ 2006-11-14 18:30 UTC (permalink / raw
  To: gentoo-user

On Wed Nov 15 2006 6:50 am, David Talkington wrote:
> Why on earth does env-update send this:
> >>> Regenerating /etc/ld.so.cache...
>
> to stderr instead of stdout?  This makes it very difficult to see only
> abnormal output in a cron job.
>
> I stopped using wget because of precisely that irritation.  I cannot for
> the life of me think of a good reason to do this.
>
> --
> David Talkington
>
> PGP key: http://www.prairienet.org/~dtalk/004B8F8B.asc
You can redirect stderr to stdout like this.

env-update 2>&1

Glenn McCarthy
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] pet peeve: sending normal output to stderr (env-update)
  2006-11-14 17:50 [gentoo-user] pet peeve: sending normal output to stderr (env-update) David Talkington
  2006-11-14 18:30 ` Glenn McCarthy
@ 2006-11-14 20:45 ` Richard Fish
  2006-11-14 21:40   ` [gentoo-user] [OT] " Daniel Iliev
  2006-11-16 18:49   ` [gentoo-user] " David Talkington
  1 sibling, 2 replies; 9+ messages in thread
From: Richard Fish @ 2006-11-14 20:45 UTC (permalink / raw
  To: gentoo-user

On 11/14/06, David Talkington <dtalk@prairienet.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Why on earth does env-update send this:
>
> >>> Regenerating /etc/ld.so.cache...

env-update.sh outputs this message with a simple "echo", so no output
to stdout here.  However portage writes most ">>>" messages to stderr.

You can either file a bug report on bugs.gentoo.org to try and get the
behavior changed, or use "emerge ... 2>&1 >/dev/null | grep -v -e '>>>
Regenerating '".  This will send stdout to /dev/null, and stderr to
the pipe where grep can filter out whatever messages annoy you.

-Richard
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] [OT] pet peeve: sending normal output to stderr (env-update)
  2006-11-14 20:45 ` Richard Fish
@ 2006-11-14 21:40   ` Daniel Iliev
  2006-11-14 22:21     ` Etaoin Shrdlu
  2006-11-16 18:49   ` [gentoo-user] " David Talkington
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2006-11-14 21:40 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:
> On 11/14/06, David Talkington <dtalk@prairienet.org> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>> Why on earth does env-update send this:
>>
>> >>> Regenerating /etc/ld.so.cache...
>
> env-update.sh outputs this message with a simple "echo", so no output
> to stdout here.  However portage writes most ">>>" messages to stderr.
>
> You can either file a bug report on bugs.gentoo.org to try and get the
> behavior changed, or use "emerge ... 2>&1 >/dev/null | grep -v -e '>>>
> Regenerating '".  This will send stdout to /dev/null, and stderr to
> the pipe where grep can filter out whatever messages annoy you.
>
> -Richard


"emerge ... 2>&1 >/dev/null | grep -v -e '>>> Regenerating '"

Isn't '>/dev/null' here by "typing habit" ? I think the right way is:

command 2>&1 | grep...


-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] [OT] pet peeve: sending normal output to stderr (env-update)
  2006-11-14 21:40   ` [gentoo-user] [OT] " Daniel Iliev
@ 2006-11-14 22:21     ` Etaoin Shrdlu
  2006-11-14 22:27       ` Daniel Iliev
  0 siblings, 1 reply; 9+ messages in thread
From: Etaoin Shrdlu @ 2006-11-14 22:21 UTC (permalink / raw
  To: gentoo-user

On Tuesday 14 November 2006 22:40, Daniel Iliev wrote:

> "emerge ... 2>&1 >/dev/null | grep -v -e '>>> Regenerating '"
>
> Isn't '>/dev/null' here by "typing habit" ? I think the right way is:
>
> command 2>&1 | grep...

Your version does not suppress standard output, Richard's version does 
(I'm not saying that one is better than the other though...).
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] [OT] pet peeve: sending normal output to stderr (env-update)
  2006-11-14 22:21     ` Etaoin Shrdlu
@ 2006-11-14 22:27       ` Daniel Iliev
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Iliev @ 2006-11-14 22:27 UTC (permalink / raw
  To: gentoo-user

Etaoin Shrdlu wrote:
> On Tuesday 14 November 2006 22:40, Daniel Iliev wrote:
>
>   
>> "emerge ... 2>&1 >/dev/null | grep -v -e '>>> Regenerating '"
>>
>> Isn't '>/dev/null' here by "typing habit" ? I think the right way is:
>>
>> command 2>&1 | grep...
>>     
>
> Your version does not suppress standard output, Richard's version does 
> (I'm not saying that one is better than the other though...).
>   

Ooops! My mistake. Sorry.

It is written "command 2>&1 >/dev/null" but I read "command >/dev/null 2>&1"


Richard is right (as usual) :)


-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: pet peeve: sending normal output to stderr (env-update)
  2006-11-14 20:45 ` Richard Fish
  2006-11-14 21:40   ` [gentoo-user] [OT] " Daniel Iliev
@ 2006-11-16 18:49   ` David Talkington
  2006-11-16 20:56     ` Richard Fish
  1 sibling, 1 reply; 9+ messages in thread
From: David Talkington @ 2006-11-16 18:49 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard Fish wrote:

> env-update.sh outputs this message with a simple "echo", so no output
> to stdout here.  However portage writes most ">>>" messages to stderr.

Well and good, but this is not an abnormal message, and there's no 
reason for it to go to stderr.  stderr is for errors, else it's just 
unbuffered stdout, which isn't terribly helpful.

File descriptor gymnastics and text munging should not be required in 
order to separate expected output from abnormal conditions.  I expect 
that from Microsoft.  ;-)

> You can either file a bug report on bugs.gentoo.org to try and get the
> behavior changed,

Thank you, I'll look into that.  Obviously, I was merely venting here.

Cheers -d

- --
David Talkington

PGP key: http://www.prairienet.org/~dtalk/004B8F8B.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFXLLA5FKhdwBLj4sRAr9eAJkBO7D7empiwxkA7+MriXL4tkx5sQCfaZXV
8rPuON/F03fbU5SCuxFrucQ=
=3WNZ
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Re: pet peeve: sending normal output to stderr (env-update)
  2006-11-16 18:49   ` [gentoo-user] " David Talkington
@ 2006-11-16 20:56     ` Richard Fish
  2006-11-16 21:53       ` Bo Ørsted Andresen
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Fish @ 2006-11-16 20:56 UTC (permalink / raw
  To: gentoo-user

On 11/16/06, David Talkington <dtalk@prairienet.org> wrote:
> Well and good, but this is not an abnormal message, and there's no
> reason for it to go to stderr.  stderr is for errors, else it's just
> unbuffered stdout, which isn't terribly helpful.

Actually lots of programs use stderr for more than just "abnormal"
output.  It is common practice in programs that generate a lot of
output to send the "verbose" messages to stdout and the status
messages to stderr.

But also, you might be interested in this:

http://forums.gentoo.org/viewtopic-t-511285.html

I actually like this idea so much, I may try my hand at hacking
portage this weekend to make a proof-of-concept!

-Richard
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Re: pet peeve: sending normal output to stderr (env-update)
  2006-11-16 20:56     ` Richard Fish
@ 2006-11-16 21:53       ` Bo Ørsted Andresen
  0 siblings, 0 replies; 9+ messages in thread
From: Bo Ørsted Andresen @ 2006-11-16 21:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On Thursday 16 November 2006 21:56, Richard Fish wrote:
> But also, you might be interested in this:
>
> http://forums.gentoo.org/viewtopic-t-511285.html
>
> I actually like this idea so much, I may try my hand at hacking
> portage this weekend to make a proof-of-concept!

You may want to have a look at bug #147516.

https://bugs.gentoo.org/show_bug.cgi?id=147516

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-11-16 22:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 17:50 [gentoo-user] pet peeve: sending normal output to stderr (env-update) David Talkington
2006-11-14 18:30 ` Glenn McCarthy
2006-11-14 20:45 ` Richard Fish
2006-11-14 21:40   ` [gentoo-user] [OT] " Daniel Iliev
2006-11-14 22:21     ` Etaoin Shrdlu
2006-11-14 22:27       ` Daniel Iliev
2006-11-16 18:49   ` [gentoo-user] " David Talkington
2006-11-16 20:56     ` Richard Fish
2006-11-16 21:53       ` Bo Ørsted Andresen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox