Skip to content

Commit

Permalink
Travis: Prefer public archives over private ones
Browse files Browse the repository at this point in the history
I had tried to do this with preferred_hosts before, but it appears to
have no effect on archive_site_local.

See: https://trac.macports.org/ticket/57720

Instead list both the public and the private URLs in archive_site_local.
They appear to be tried in the order listed.

But then we need to fix the base bug with multiple URLs in
archive_site_local:

See: https://trac.macports.org/ticket/57718

See: https://trac.macports.org/ticket/54800
See: #3099
  • Loading branch information
ryandesign committed Dec 4, 2018
1 parent 61ade81 commit 531720b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions _ci/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ sudo sed -i "" "s|rsync://rsync.macports.org/macports/release/tarballs/ports.tar
echo "ui_interactive no" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Only download from the CDN, not the mirrors
echo "host_blacklist *.distfiles.macports.org *.packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Also try downloading archives from the private server
echo "archive_site_local https://packages-private.macports.org/:tbz2" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Try downloading archives from the private server after trying the public server
echo "archive_site_local https://packages.macports.org/:tbz2 https://packages-private.macports.org/:tbz2" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Prefer to get archives from the public server instead of the private server
echo "preferred_hosts packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Fix bug in MacPorts 2.5.4 that makes archive_site_local not work
# preferred_hosts has no effect on archive_site_local
# See https://trac.macports.org/ticket/57720
#echo "preferred_hosts packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null
# Fix bug in MacPorts 2.5.4 that makes archive_site_local not work at all
# See https://trac.macports.org/ticket/57717
sudo sed -E -i "" "s,{} ({} ARCHIVE_SITE_LOCAL),\1," /opt/local/libexec/macports/lib/package1.0/portarchivefetch.tcl
# Fix bug in MacPorts 2.5.4 that mishandles multiple URLs in archive_site_local
# See https://trac.macports.org/ticket/57718
sudo sed -E -i "" 's,\[list (\$env\(\$senv\))\],\1,' /opt/local/libexec/macports/lib/port1.0/fetch_common.tcl
# Update PortIndex
rsync --no-motd -zvl "rsync://rsync.macports.org/macports/release/ports/PortIndex_darwin_${OS_MAJOR}_i386/PortIndex*" .
git remote add macports https://github.com/macports/macports-ports.git
Expand Down

0 comments on commit 531720b

Please sign in to comment.