Opened 8 years ago

Last modified 8 years ago

#49496 new enhancement

Offer a choice of mirror server in the MacPorts installer package

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Low Milestone:
Component: base Version: 2.3.99
Keywords: Cc:
Port:

Description

It was suggested in #49452 that the MacPorts installer package could offer the user the choice of which MacPorts mirror server to use. Since the installer automatically runs selfupdate when it's done, such an option would help new users in situations where the primary rsync server is slow or suffering from an outage. It would also make it easier for users who want to use a different MacPorts mirror, since otherwise the user has to edit multiple configuration files.

This could be accomplished by offering sub-packages in the installer, much like the Xcode 3 installer did where it offered you checkboxes to select whether to install the command line tools or the old OS X SDK.

We would have to somehow ensure that one and only one of the mirrors is selected. We would also have to consider what to do in the case of an existing MacPorts installation configured to use something other than the rsync server for its ports tree (but still using rsync for selfupdate, since there is no alternative for that). The simplest might be to make no changes in this case.

A further enhancement could be to detect (e.g. via ping) which server is closest and default to using that.

Change History (1)

comment:1 Changed 8 years ago by lpancescu (Laurențiu Păncescu)

Another possibility is to invoke rsync (eventually with --timeout, in case the connection stalls), and send it a TERM signal if it's not finished in e.g. 2 minutes, to retry using a different mirror. An alternative to ping is getting the region using the free MaxMind GeoIP Lite database [1], but ping might be simpler to implement.

As for the user interface, since you said that nobody made such a request in all these years, I'd also settle for the installer checking if there's an environment variable MACPORTS_MIRROR set, and using that.

[1] http://wiki.tcl.tk/12521

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.