Opened 4 years ago

Last modified 4 years ago

#62144 new defect

base: On Mountain Lion configuration file is processed but it ignores archives server URL

Reported by: snowflake (Dave Evans) Owned by:
Priority: Low Milestone:
Component: base Version: 2.6.99
Keywords: Cc:
Port:

Description

In configuration file /opt/local/etc/macports/archive_sites.conf I have set a URL for my local archives server. This works for my two Macs and 3 VMs, but on Mountain Lion the setting is ignored. The file is processed and I can set it to ignore the Macports servers, but on Mountain Lion the URL does not work.

On Mountain Lion i have to set the URL in the ports tree file _resources/port1.0/fetch/archive_sites.tcl

This is a low priority bug.

Attachments (2)

archive_sites.conf (2.8 KB) - added by snowflake (Dave Evans) 4 years ago.
archive_sites.conf from my Mountain Lion VM
mountain-lion.main.log (5.8 KB) - added by snowflake (Dave Evans) 4 years ago.
Mountain Lion main.log for installing watch, showing it does not attempt to access my server

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

There shouldn't be any code in MacPorts that influences this feature based on OS version, so that difference between your systems is likely irrelevant.

Can you attach a main.log showing your local site being ignored? Can you also attach your archive_sites.conf so we can make sure it's set up correctly?

MacPorts base is hardcoded to only check for archives on three packages servers. If it fails to find an archive on the first three servers it tries, it falls back to building from source, even if the archive does exist on another packages server that it didn't check.

There is a configuration option archive_site_local which you can set in macports.conf to specify a local packages server, just as master_site_local and patch_site_local specify a local distfiles server. Maybe this works better or differently than using archive_sites.conf. Example:

archive_site_local  http://packages.local/:tbz2

I admit I am unsure why we have two methods of adding local archive sites. It is possible that they work differently or that one or the other doesn't work right.

We use archive_site_local in our buildbot configuration, running on all OS versions from 10.6 to 11, and I use it on my own machines as well.

Changed 4 years ago by snowflake (Dave Evans)

Attachment: archive_sites.conf added

archive_sites.conf from my Mountain Lion VM

Changed 4 years ago by snowflake (Dave Evans)

Attachment: mountain-lion.main.log added

Mountain Lion main.log for installing watch, showing it does not attempt to access my server

comment:2 Changed 4 years ago by snowflake (Dave Evans)

On Mountain Lion, setting archive_sites_local works.

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, so it successfully found the package on another site.

MacPorts tries sites in an order that is supposed to result in the fastest/nearest servers being tried first. It must not realize that your server is nearest.

MacPorts determines which server is closer by ping time. If your private packages server doesn't respond to pings, that would put it last in the list. So make sure the private packages server responds to pings.

MacPorts caches ping times for 24 hours. Possibly this problem will resolve itself within 24 hours when it re-checks servers' ping times. Or you can make it check again immediately by deleting the file /opt/local/var/macports/pingtimes.

There is a setting preferred_hosts that you are supposed to be able to use to override MacPorts' decision about which server to try first, but I was not able to get it to work consistently. See #57720.

Note: See TracTickets for help on using tickets.