[gobolinux-users] Freshen 2.2.6: failed when stdin and stdout are redirected?
rubisher
rubisher at scarlet.be
Mon Aug 27 11:13:11 UTC 2007
---------- Initial header -----------
>From : gobolinux-users-bounces at lists.gobolinux.org
To : gobolinux-users at lists.gobolinux.org
CC :
Date : Mon, 27 Aug 2007 10:59:52 +1200
Subject : Re: [gobolinux-users] Freshen 2.2.6: failed when stdin and stdout
are redirected?
> On 8/26/07, rubisher <rubisher at scarlet.be> wrote:
> > Hello Michael,
> >
> > With this release 2.2.6 of Freshen, when I redirect stdin and stdout, it
failed:
> > # Freshen -U KDE-Base 2>&1 | tee /var/tmp/Freshen-KdeBase.doc
> > Freshen: Producing updates list...
> > Freshen: Examining only KDE-Base
> > Backtrace:
> > /usr/local/sbin/Freshen:637:in `progStatus'
> > /usr/local/sbin/Freshen:326:in `upgradeSystem'
> > /usr/local/sbin/Freshen:325:in `each'
> > /usr/local/sbin/Freshen:325:in `upgradeSystem'
> > /usr/local/sbin/Freshen:183:in `run'
> > /System/Links/Libraries/ruby/site_ruby/1.8/gobo.rb:187:in `start'
> > /usr/local/sbin/Freshen:694
> > [IUR] Xorg 7.2-r5 (KDE-Base)
7.2-r2
> > [IUR] Cairo 1.4.2-r1 (Pango)
1.4.0
> > [IUR] Pango 1.16.2-r1 (DBus)
1.16.0
> > [IUR] GTK+ 2.10.11-r2 (DBus)
2.10.11-r1
> > [IUR] DBus 1.0.2-r3 (KDE-Base)
1.0.2-r2
> > Freshen: Error: undefined method `+' for nil:NilClass [NoMethodError]
> >
> > while it doesn't show this pb when I doesn't redirect std in/out:
> I don't think you did redirect stdin, did you?
Oops, I mean STDERR
> In any case, I don't
> think Freshen reads anything, so it shouldn't matter if you do,
> although if it calls Compile for anything you might be in trouble.
> Freshen also doesn't output anything to standard error, so you can
> save some typing and leave that part out.
>
Ok
> You have uncovered a bug when STDOUT is not a tty, though: you can fix
> it by changing line 21 of lib/screen.rb to "Colours = Hash.new('')",
Cool, works fine nows ;-)
> or check out from CVS. I will release a new version with that at some
> point (when there are more substantive changes to make). The problem
> arises because it doesn't show colours if it detects it's not going
> directly to a tty. I'm not sure whether that's even a desirable
> behaviour any more, come to think of it.
Well the main idea is to log all steps of a long upgrade like e.g. KDE-Base
as it depends of "[IUR] Xorg 7.2-r5 (KDE-Libs)" while only 7.2-r2 is
installed and for which right now there isn't yet binaries available.
So colors, in this case, are bad as they make reading of logs more
difficult.
e.g.
[snip]
^[[1;30mGetRecipe:^[[0m ^[[36mTrying to
get /Files/Compile/Recipes/LibDRM/2.3.0-r1^[[0m
[snip]
(but could be easily cleanup ;-))
That said, it would be cool if Freshen itself would have this loging option
builtin (like sam or smitty), isn't it?
Tx again,
r.
> -Michael
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
>
>
---
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
http://www.scarlet.be/
More information about the gobolinux-users
mailing list