Commits
Ryan Schmidt authored 531720bba7a
11 11 | sudo tar -xpf "MacPorts-${OS_MAJOR}.tar.bz2" -C / |
12 12 | rm -f "MacPorts-${OS_MAJOR}.tar.bz2" |
13 13 | # Prepare environment variables: clear CC and set PATH for port |
14 14 | unset CC && source /opt/local/share/macports/setupenv.bash |
15 15 | # Set ports tree to $PWD |
16 16 | sudo sed -i "" "s|rsync://rsync.macports.org/macports/release/tarballs/ports.tar|file://${PWD}|; /^file:/s/default/nosync,default/" /opt/local/etc/macports/sources.conf |
17 17 | # CI is not interactive |
18 18 | echo "ui_interactive no" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null |
19 19 | # Only download from the CDN, not the mirrors |
20 20 | echo "host_blacklist *.distfiles.macports.org *.packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null |
21 - | # Also try downloading archives from the private server |
22 - | echo "archive_site_local https://packages-private.macports.org/:tbz2" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null |
21 + | # Try downloading archives from the private server after trying the public server |
22 + | 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 |
23 23 | # Prefer to get archives from the public server instead of the private server |
24 - | echo "preferred_hosts packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null |
25 - | # Fix bug in MacPorts 2.5.4 that makes archive_site_local not work |
24 + | # preferred_hosts has no effect on archive_site_local |
25 + | # See https://trac.macports.org/ticket/57720 |
26 + | #echo "preferred_hosts packages.macports.org" | sudo tee -a /opt/local/etc/macports/macports.conf >/dev/null |
27 + | # Fix bug in MacPorts 2.5.4 that makes archive_site_local not work at all |
26 28 | # See https://trac.macports.org/ticket/57717 |
27 29 | sudo sed -E -i "" "s,{} ({} ARCHIVE_SITE_LOCAL),\1," /opt/local/libexec/macports/lib/package1.0/portarchivefetch.tcl |
30 + | # Fix bug in MacPorts 2.5.4 that mishandles multiple URLs in archive_site_local |
31 + | # See https://trac.macports.org/ticket/57718 |
32 + | sudo sed -E -i "" 's,\[list (\$env\(\$senv\))\],\1,' /opt/local/libexec/macports/lib/port1.0/fetch_common.tcl |
28 33 | # Update PortIndex |
29 34 | rsync --no-motd -zvl "rsync://rsync.macports.org/macports/release/ports/PortIndex_darwin_${OS_MAJOR}_i386/PortIndex*" . |
30 35 | git remote add macports https://github.com/macports/macports-ports.git |
31 36 | git fetch macports master |
32 37 | git checkout -qf macports/master |
33 38 | git checkout -qf - |
34 39 | portindex -e |
35 40 | # Create macports user |
36 41 | sudo /opt/local/postflight && sudo rm -f /opt/local/postflight |
37 42 | # Install mpbb and its dependency getopt |