Why does macports require a migration across major version bumps?

Clemens Lang cal at macports.org
Wed Aug 30 18:29:24 UTC 2017


Hi,

On Tue, Aug 29, 2017 at 06:01:36PM -0700, Eitan Adler wrote:
> What is the underlying reason to require a reinstall across major
> versions? I did something silly/stupid/smart  and removed the check
> from libexec/macports/lib/macports1.0/macports.tcl and just did 'sudo
> port upgrade outdated' to rebuild the world.

Use 'sudo port -f selfupdate' instead, which should also recompile your
version of MacPorts. I'm not sure whether this will work in the
'disabled due to OS upgrade' mode, but if it doesn't, maybe you could
submit a pull request to allow it?

> It got about 90% of the way through and only errored on a few expected
> broken-for-other-reasons ports.
> 
> Obvious I'm down the deep hole of unsupported actions but I'm curious
> about what gets missed when someone does this?

The reason why we don't recommend doing this is that we don't know
whether things will keep working over an OS upgrade. A couple of
examples where this could lead to problems:

 - Architecture changes. Builds of ports might try to run old binaries
   built for old architectures and fail to build, or even worse, try to
   link against old libraries built for old architectures and fail to
   link.
 - Changes in the tooling Apple ships with macOS. The most famous
   example of this is probably the removal of gnutar in favor of BSD
   tar, which caused extractions in MacPorts to fail.
 - Missing libraries. Apple might remove (or upgrade to an incompatible
   version) a library that was required by one of the build tools used
   by the builds of our ports, causing those tools to fail to start and
   thus likely fail the build. For example, you might have GNU awk
   installed with MacPorts, but (for some reasons) it might link against
   an older libintl.dylib in /usr/lib, which no longer exists.
   Attempting to start this copy of gawk would immediately abort, and
   builds would fail (even though you have a perfectly working other
   version of awk around).

Most of these things should not cause problems if there are no
'automagic' dependencies, i.e. dependencies that get picked up and used
when they are present. In the absence of such problems, MacPorts should
already sort all ports topologically and re-installed them one-by-one
without issue.

In theory, reinstalling MacPorts and using 'sudo port -t upgrade
outdated' after an OS update should thus have the same effect as the
migration instructions. In fact, I've been exclusively doing this
approach for my migration for the last three OS upgrades. However, I
also happen to know what I'm doing and how to debug things if they
break, so I cannot generall recommend this to others.

-- 
Clemens


More information about the macports-dev mailing list