In one instance only
graphics/libGL was installed. The transition was simplified by running these two commands:
portupgrade -fpvo graphics/mesa-libs graphics/libGL portupgrade -fprvx graphics/mesa-libs graphics/mesa-libs
If you’re able to do the above, then similar commands can be run to change
portupgrade -fpvo graphics/mesa-dri graphics/dri portupgrade -fprvx graphics/mesa-dri graphics/mesa-dri
Other systems had installed two or more of these ports:
In such cases it is more prudent to delete all the orphaned ports and reinstall the missing applications. A system or role specific meta-port is very handy in these cases.
pkg delete graphics/dri graphics/gbm graphics/libEGL graphics/libGL graphics/libglapi graphics/libglesv2 portupgrade -Nfprv local/bsdnet-labs
I experimented on my virtual machines at home this weekend, doing all kinds of senseless actions like forcefully installing
graphics/mesa-libs from a package built by yours truly, and running commands such as
pkg set -n new-name:old-name and
pkg set -o new-origin:old-origin. As soon as I tried to upgrade
portupgrade, the build system complained about overwriting files belonging to other ports. Setting
FORCE_PKG_REGISTER in the environment had no effect.
Maybe all I missed is a command for changing the old dependencies to point to the new common one, and another command for removing the old entries without actually removing any of the installed files. The
pkg delete -D command exists, but it also removes the consumers of the Mesa libraries, which I wanted to avoid.
pkg package manager isn’t clever enough to handle multiple ports changing their names and origins to common values. Removing the orphaned ports and reinstalling the missing ports takes less time.