Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Sep 2007 06:06:13 -0700
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        Sergey Matveychuk <sem@FreeBSD.org>
Cc:        Russell Jackson <raj@csub.edu>, freebsd-ports@freebsd.org
Subject:   Re: portupgrade exits immediately when stdin/out closed
Message-ID:  <46DEA9C5.5080009@u.washington.edu>
In-Reply-To: <46DE8DA8.1030506@FreeBSD.org>
References:  <46DDE90D.8090700@csub.edu> <46DE8DA8.1030506@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Matveychuk wrote:
> Russell Jackson wrote:
>> I'm debugging a problem with portupgrade being used as part of an 
>> automated package
>> handler within puppet (http://puppet.reductivelabs.com).
>>
>> The problem is that when the handler executes portupgrade as an 
>> external process from
>> ruby, portupgrade hangs with a script process taking up 100% of the 
>> cpu. I suspected that
>> script isn't designed to be run without a controlling tty. So, I 
>> executed portupgrade like
>> so to test:
>>
>> portupgrade --new --batch --yes <port> <&- >&- 2>&- &
>>
>> To my surprise, portupgrade exits immediately with a status of 0. I 
>> found an old pr
>> (bin/56166) describing similar behavior. It looks like script was 
>> fixed, but portupgrade
>> still isn't happy.
>>
>> This happens with both ports-mgmt/portupgrade and 
>> ports-mgmt/portupgrade-devel.
>>
>> Suggestions?
>>
>
> portupgrade was fixed to work when tty is not a physical device but 
> file or so.
>
> I think you don't want to run portupgade this way really. You have a 
> possibility to brake everything.
>

    I'm not sure how well ruby's debug mode does compared to perl, or 
how it works in comparison, but try preceding the portupgrade command 
with '/usr/local/bin/ruby18 -d', to force portupgrade to run in debug mode.
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46DEA9C5.5080009>