[MacPorts] #59217: Need to delete 10.6-10.8 archives for ports that used the cxx11 1.1 portgroup and rebuild them

MacPorts noreply at macports.org
Thu Oct 31 06:17:33 UTC 2019


#59217: Need to delete 10.6-10.8 archives for ports that used the cxx11 1.1
portgroup and rebuild them
-----------------------------+-------------------------------------------
  Reporter:  ryandesign      |      Owner:  ryandesign
      Type:  defect          |     Status:  accepted
  Priority:  Normal          |  Milestone:
 Component:  server/hosting  |    Version:  2.6.1
Resolution:                  |   Keywords:  snowleopard lion mountainlion
      Port:                  |
-----------------------------+-------------------------------------------
Changes (by ryandesign):

 * component:  ports => server/hosting


Comment:

 I downloaded the [https://github.com/macports/macports-
 ports/releases/tag/v2.6.0-archive 2.6.0 archive] of ports, extracted it,
 ran `portindex` in it, set up sources.conf to use it as my primary ports
 tree, and ran these commands in it to find all the portfiles that used the
 cxx11 1.1 portgroup at the time that MacPorts 2.6.0 was released:

 {{{
 find . -name Portfile \
 | xargs grep -E
 '^[[:space:]]*PortGroup[[:space:]]+cxx11[[:space:]]+1\.1[[:space:]]*$' \
 | cut -d / -f 3 \
 | tee ~/cxx11-1.1-ports.txt
 }}}

 Output:
 [attachment:cxx11-1.1-ports.txt]

 Then I used these commands to identify all the subports:

 {{{
 xargs -I % port echo % subportof:% < ~/cxx11-1.1-ports.txt \
 | sed -E 's/ +//' \
 | tee ~/cxx11-1.1-subports.txt
 }}}

 Output:
 [attachment:cxx11-1.1-subports.txt]

 I didn't attempt to distinguish which subports used the portgroup. If the
 portgroup is mentioned at all in a portfile, I'm counting all of its
 subports as using it. This means some ports will get uninstalled / deleted
 that didn't need to be. That's fine. They'll get rebuilt.

 I copied [attachment:cxx11-1.1-subports.txt] to the 10.6-10.8 builders and
 uninstalled those subports using these commands (run once on each
 builder):

 {{{
 xargs /opt/local/bin/port -q installed < ~/cxx11-1.1-subports.txt \
 | sed -E 's/ \(active\)$//' \
 | xargs sudo /opt/local/bin/port -f uninstall \
 | tee ~/$(hostname -s)-uninstall.log
 }}}

 Output:
 [attachment:snowleopard-i386-uninstall.log]
 [attachment:snowleopard-uninstall.log]
 [attachment:lion-uninstall.log]
 [attachment:mountainlion-uninstall.log]

 Even ports that had already been updated/fixed after the 2.6.0 release
 were uninstalled. That's fine. They'll get reinstalled automatically as
 needed by future builds.

 Other ports had failed to build because of this problem with these cxx11
 ports, so I deleted the entire failcache on the 10.6-10.8 builders. This
 seemed like the simplest way to ensure no builds are skipped because of
 this problem.

 I copied [attachment:cxx11-1.1-subports.txt] to the packages server and
 deleted the public and private archives for 10.6-10.8 older than the 2.6.0
 release date using these commands (run once in each directory):

 {{{
 # 2.6.0 release date as mmddHHMMccyy (UTC)
 release_date=$(date -ju 092102492019 +%s)
 while read p; do
   for f in $p/*.darwin_1[012].*.tbz2; do
     if [[ $f != *.noarch.tbz2 && -f $f ]]; then
       mod_date=$(stat -f %m $f)
       if [ $mod_date -lt $release_date ]; then
         echo $f
         echo $f.rmd160
       fi
     fi
   done
 done < ~/cxx11-1.1-subports.txt \
 | xargs rm -fv \
 | tee ~/delete-$(basename $PWD).log
 }}}

 Output:
 [attachment:delete-packages.log]
 [attachment:delete-packages-private.log]

 I'm now waiting for the deletion of the packages to sync to the public
 server. After that, I'll purge the MaxCDN cache for the packages zone,
 reactivate the 10.6-10.8 builders, and schedule new builds of
 [attachment:cxx11-1.1-ports.txt] on the 10.6-10.8 builders. And that
 should take care of this ticket.

-- 
Ticket URL: <https://trac.macports.org/ticket/59217#comment:23>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list