Debugging restore_ports.tcl
Christopher Jones
jonesc at hep.phy.cam.ac.uk
Tue Feb 9 11:38:29 UTC 2021
> On 9 Feb 2021, at 11:22 am, Pieter van Oostrum <pieter-l at vanoostrum.org> wrote:
>
> Eric Gallager via macports-users <macports-users at lists.macports.org <mailto: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.
Personally, I would recommend not trying to restore *every* port, as this will include a bunch of dependencies that might not be needed on a new OS, or might even not work there.
Look at the list of *requested* ports you installed. This will be a lot lot shorter, short enough to go through by hand and install one by one.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20210209/c3c77d33/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20210209/c3c77d33/attachment.bin>
More information about the macports-users
mailing list