* [gentoo-user] PORTAGE_ELOG_COMMAND
@ 2012-08-23 15:09 Jorge Almeida
2012-08-23 15:34 ` Neil Bothwick
0 siblings, 1 reply; 5+ messages in thread
From: Jorge Almeida @ 2012-08-23 15:09 UTC (permalink / raw
To: gentoo-user
Anyone knows how PORTAGE_ELOG_COMMAND is really supposed to work? I did read
the documentation in /etc/make.conf and
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=1
The API is not documented. I _assumed_ that the program /path/to/logprocessor
reads logs from STDIN and does whatever it wants with them. I tried a program
that appends what it receives from STDIN to a hard-coded file. I end up with
an empty file, and emerge warns about a timeout that is not mentioned in the
documentation. The timeout is in the source, but I don't know python...
Can someone clarify this?
TIA
Jorge Almeida
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] PORTAGE_ELOG_COMMAND
2012-08-23 15:09 [gentoo-user] PORTAGE_ELOG_COMMAND Jorge Almeida
@ 2012-08-23 15:34 ` Neil Bothwick
2012-08-23 18:16 ` Jorge Almeida
0 siblings, 1 reply; 5+ messages in thread
From: Neil Bothwick @ 2012-08-23 15:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
On Thu, 23 Aug 2012 16:09:47 +0100, Jorge Almeida wrote:
> Anyone knows how PORTAGE_ELOG_COMMAND is really supposed to work? I did
> read the documentation in /etc/make.conf and
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=1
> The API is not documented. I _assumed_ that the
> program /path/to/logprocessor reads logs from STDIN and does whatever
> it wants with them.
The URL you gave states that is not the case. The name of the logfile is
passed as a variable, it is up to your program to read the logfile and do
whatever it wants with the contents.
> I tried a program that appends what it receives
> from STDIN to a hard-coded file. I end up with an empty file, and
> emerge warns about a timeout that is not mentioned in the
> documentation. The timeout is in the source, but I don't know python...
It times out because your program is waiting for input on STDIN and there
is none.
--
Neil Bothwick
Men who go out with flat chested woman have reasons for feeling down
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] PORTAGE_ELOG_COMMAND
2012-08-23 15:34 ` Neil Bothwick
@ 2012-08-23 18:16 ` Jorge Almeida
2012-08-23 19:21 ` Neil Bothwick
0 siblings, 1 reply; 5+ messages in thread
From: Jorge Almeida @ 2012-08-23 18:16 UTC (permalink / raw
To: gentoo-user
On Thu, Aug 23, 2012 at 4:34 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Thu, 23 Aug 2012 16:09:47 +0100, Jorge Almeida wrote:
>
>> The API is not documented. I _assumed_ that the
>> program /path/to/logprocessor reads logs from STDIN and does whatever
>> it wants with them.
>
> The URL you gave states that is not the case. The name of the logfile is
> passed as a variable, it is up to your program to read the logfile and do
> whatever it wants with the contents.
>
Well, it doesn't really state it. I can make it work now, but only without
escaping backslash ('${... instead of '\${...). Maybe it is assumed that the
program is a shell script? Moreover, the variables can be passed as arguments,
not necessarily as options. All obvious once you know it, of course.
Thank you
J.A.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] PORTAGE_ELOG_COMMAND
2012-08-23 18:16 ` Jorge Almeida
@ 2012-08-23 19:21 ` Neil Bothwick
2012-08-23 19:41 ` Jorge Almeida
0 siblings, 1 reply; 5+ messages in thread
From: Neil Bothwick @ 2012-08-23 19:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
On Thu, 23 Aug 2012 19:16:57 +0100, Jorge Almeida wrote:
> > The URL you gave states that is not the case. The name of the logfile
> > is passed as a variable, it is up to your program to read the logfile
> > and do whatever it wants with the contents.
> >
> Well, it doesn't really state it. I can make it work now, but only
> without escaping backslash ('${... instead of '\${...). Maybe it is
> assumed that the program is a shell script? Moreover, the variables can
> be passed as arguments, not necessarily as options. All obvious once
> you know it, of course.
The point is you pass the name of the logfile as a variable, you do not
use STDIN.
--
Neil Bothwick
Top Oxymorons Number 29: Soft rock
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] PORTAGE_ELOG_COMMAND
2012-08-23 19:21 ` Neil Bothwick
@ 2012-08-23 19:41 ` Jorge Almeida
0 siblings, 0 replies; 5+ messages in thread
From: Jorge Almeida @ 2012-08-23 19:41 UTC (permalink / raw
To: gentoo-user
On Thu, Aug 23, 2012 at 8:21 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Thu, 23 Aug 2012 19:16:57 +0100, Jorge Almeida wrote:
>
>
> The point is you pass the name of the logfile as a variable, you do not
> use STDIN.
>
Yes, that part was clear after your previous mail.
Thanks again
J.A.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-23 19:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 15:09 [gentoo-user] PORTAGE_ELOG_COMMAND Jorge Almeida
2012-08-23 15:34 ` Neil Bothwick
2012-08-23 18:16 ` Jorge Almeida
2012-08-23 19:21 ` Neil Bothwick
2012-08-23 19:41 ` Jorge Almeida
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox