macports fetch suggestion

Daniel Price daniel.price at monash.edu
Mon Sep 12 03:30:40 PDT 2011


On 12 Sep 2011, at 17:54, Ryan Schmidt wrote:

> On Sep 12, 2011, at 02:01, Daniel Price wrote:
> 
>> On 12 Sep 2011, at 16:40, Ryan Schmidt wrote:
>> 
>>> why does it matter to you whether MacPorts fetches right before building each port, as it does now, or all up front as you suggest?
> 
>> As for why it matters, take the following: I want to install something that involves gcc. I type "port install thing". Thing invokes gcc (no I did not check beforehand that gcc was a dependency). gcc takes 2 minutes to download but several hours to compile. In 2 minutes I am sure I still have an internet connection. In several hours, I may be on the bus or wherever but the port install process is still ticking away in the background and will fail when it gets to the next thing after gcc.
>> 
>> So it matters only when the build time is >> the fetch time. Does it *really* matter? No. Just a nice-to-have. I am less worried about a 45 second delay due to pre-fetching if it will take 3 hours to compile. But as you say, it may not be worth it if it slows down the build of "easy" ports.
> 
> In that case sure I can see that pre-fetching would be useful. If you anticipate losing network connectivity soon, you can run "sudo port fetch rdepof:SOMEPORT" beforehand.
> 
> If you're not sure what ports will be installed and you want to know beforehand, you can do a dry run:
> 
> sudo port -y install SOMEPORT
> 
> If you still find yourself in a situation where MacPorts is taking a long time to build a port and you need to leave your Internet connection, you can interrupt the build by pressing ctrl+c, then fetch any remaining dependencies with "sudo port fetch" as above, then resume the installation by re-issuing the "sudo port install" command. Note that I would not recommend interrupting MacPorts with ctrl+c in any phase other than the build phase; doing so might lead to errors when you resume, and if so you would have to clean the port and start the build over.
> 

there's one more point here, which is that this is only really an issue when the build time is long. If macports does eventually have binary installs, then the problem also goes away as the build time should be a lot quicker anyway.

Daniel


More information about the macports-dev mailing list