On Tue, 24 Dec 2024, at 15:17, Joshua Root wrote: > A stable sort algorithm is used, so hosts with identical ping times > stay in the same relative order that they were originally in in > archive_sites.tcl. > > The way preferred_hosts works is to override the ping time of matching > hosts to 0.
Ah, I see. Thanks. Perhaps I am going about this problem in the wrong way. Instead of mucking about with preferred_hosts -- where ordering is a bit tricky -- I could insert the CDN names into host_blacklist and let MacPorts sort the rest out itself. (In retrospect, this was the obvious workaround.) The snippet below is a dump of my MacPorts pingtimes cache. Excluding the Fastly endpoints, it is close to what I would have selected by hand. 10.751 packages.macports.org 10.964 distfiles.macports.org 14.527 codeload.github.com 23.367 aarnet.au.packages.macports.org 119.918 kmq.jp.packages.macports.org 126.609 jog.id.packages.macports.org 153.655 oldmanprogrammer.net 154.303 mirror.fcix.net 160.063 cjj.kr.distfiles.macports.org 168.125 pek.cn.distfiles.macports.org 169.017 pek.cn.packages.macports.org 195.174 mirror.sjtu.edu.cn 202.477 ywg.ca.distfiles.macports.org 202.586 ywg.ca.packages.macports.org 205.712 ykf.ca.distfiles.macports.org 206.204 bos.us.distfiles.macports.org 208.724 mirrors.mit.edu 209.640 bos.us.packages.macports.org 237.326 download.imagemagick.org 252.760 fra.de.packages.macports.org 254.096 fra.de.distfiles.macports.org 255.442 nue.de.packages.macports.org 255.497 www.dest-unreach.org 256.046 nue.de.distfiles.macports.org 258.640 fco.it.packages.macports.org 260.334 fco.it.distfiles.macports.org 260.509 mse.uk.packages.macports.org 260.568 mse.uk.distfiles.macports.org 263.888 mirror.checkdomain.de 267.018 cph.dk.packages.macports.org 268.801 cph.dk.distfiles.macports.org 274.777 vie.at.packages.macports.org 275.031 vie.at.distfiles.macports.org 312.543 lis.pt.packages.macports.org 312.552 lis.pt.distfiles.macports.org 324.448 sunsite.icm.edu.pl 408.083 jnb.za.distfiles.macports.org 408.836 jnb.za.packages.macports.org 10000.000 atl.us.packages.macports.org 10000.000 atl.us.distfiles.macports.org 10000.000 ftp.u-aizu.ac.jp