Debugging restore_ports.tcl

Pieter van Oostrum pieter-l at vanoostrum.org
Tue Feb 9 11:22:59 UTC 2021


Eric Gallager via macports-users <macports-users at lists.macports.org> writes:

> On Mon, Feb 8, 2021 at 1:03 PM Ryan Schmidt <ryandesign at macports.org> wrote:
>>
>>
>>
>> On Feb 7, 2021, at 20:59, Eric Gallager wrote:
>>
>> > When restore_ports.tcl gets stuck building its list of ports to
>> > restore, is there a way to get it to tell you which ports exactly it's
>> > failing to process? i.e., which ports to remove from your myports.txt
>> > to get it to continue?
>>
>> I don't know. In what way is it getting stuck?
>
> It's the part on the Troubleshooting section of the wiki page where it says:
>
> If you see an "infinite loop" error message, such as this:
>
> Error: we appear to be stuck, exiting...
> infinite loop
>     while executing
> "sort_ports $portList"
>     invoked from within
> "set operationList [sort_ports $portList]"
>     (file "./restore_ports.tcl" line 285)
>
> it indicates that the script has a list of ports to install, and it
> can't figure out which of the ports to install next.
>
> https://trac.macports.org/wiki/Migration#Troubleshooting
>
> The workaround it suggests to deal with this issue is "to reduce your
> list of ports to install, until it no longer has a dependency cycle,"
> but it doesn't say exactly HOW to go about choosing which ports to
> remove from the list in order to reduce its length.
> My myports.txt file has 6147 lines in it. I don't know where to begin with it.

The usual way of tackling these kinds of problems is "bisecting". Divide the list in two halves, and try each of these separately. If a half fails, then divide it in two halves again, etc.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]


More information about the macports-users mailing list