* Only deactivate ports that are not needed for the next build, rather
than always deactivating everything.
* Only deactivate ports before dependency installations if building
from source (most installs will now be from an archive).
* Fail fast if a dependency is in the failcache, rather than continuing
to check the rest of the deps. That does mean that multiple failed
deps might have to be discovered one at a time by maintainers, but
on the other hand the failcache checks can really add up and cause us
to spend significant time on a port that we already know will fail.
* Replace much shell code with Tcl in order to take advantage of direct
API access to avoid repeated work.
* Turn off verbose and debug output during the final activation step.
See: https://trac.macports.org/ticket/62621
Skip mirroring if any of the port's distfiles already had a checksum
mismatch this run. Also skip if all of the port's distfiles were
already successfully mirrored, since that information becomes readily
available in solving the aforementioned problem.
Fixes: https://trac.macports.org/ticket/57343
This was previously done so that the dependencies' archives could be
gathered if needed, but now that will have been done in separate
builds.
Closes: https://trac.macports.org/ticket/57568