Macports installer endless loop

dreamcat four dreamcat4 at gmail.com
Fri Feb 12 02:00:08 PST 2010


Link:
http://github.com/dreamcat4/site-cookbooks/blob/COOK-254/mac_os_x/recipes/macports.rb#L81-83

AFAICT, when it works, the installer takes a very long time and loops
around a lot. The real problems is, when it doesn't work, the
installer may never exit and we can't really be sure what's going on
and cannot kill it off. Wouldn't it be just common sense to but in a
loop limit, and have the installer exit with an error if the limit if
reached? Can I see the code for the installer script?

For the life of me I cannot find where this TCL installer is looping
around. Attached is the full log for a successful run. It suggest that
the program will loop approximately 177 times. Doesn't that sound a
little bit crazy?

Anyway we might set a safe loop limit as 200 for exiting the loop.


On Fri, Feb 12, 2010 at 12:12 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Feb 11, 2010, at 06:23, dreamcat four wrote:
>
>> I'm writing a chef recipe to download and install macports
>> automatically. But when invoked by the chef "execute" methods, its
>> stuck in what seems to be an endless loop:
>>
>> installer: Running package scripts….....
>> #
>> installer: Running package scripts….....
>> #
>> installer: Running package scripts….....
>> #
>> installer: Running package scripts….....
>> #
>>
>>
>> I can see a tclsh8.5 process, and 2 rsync processes hanging about.
>>
>> I left the command running for a long time and it seemed never to exit.
>> Then I switched to using bash, and it still took a very long time.
>> But it finally exited.
>>
>> This can be a problem for chef if the installer never exits.
>> Any ideas?
>
> I have no idea what chef is. :) Is it a scripting language of some kind? If so, can you show us the script that you wrote to do this?
>
>
>


More information about the macports-dev mailing list