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
08-23-2012, 06:16 PM
Jorge Almeida
PORTAGE_ELOG_COMMAND
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.
08-23-2012, 07:21 PM
Neil Bothwick
PORTAGE_ELOG_COMMAND
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
08-23-2012, 07:41 PM
Jorge Almeida
PORTAGE_ELOG_COMMAND
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.