Question about port reclaim and dependencies...

Ryan Schmidt ryandesign at macports.org
Tue Jun 19 08:03:16 UTC 2018


On Jun 18, 2018, at 16:15, Carlo Tambuatco wrote:

> Doing some routine cleaning up of old unecessary ports and I was wondering 
> how port treats duplicate ports... I realised I've got two instances of the 
> xrender port installed so I'll use this as an example.
> 
> I've got these two ports installed
> 
>  xrender @0.9.10_0
>  xrender @0.9.10_0+universal (active)
> 
> and only the +universal variant is active. So does that mean that all dependents of the 
> xrender port are really only dependent on the active version, through some complex system of symlinks, and the inactive version is safe to uninstall completely? 
> 
> I'm just using this port as one example, but generalizing to other ports, it is completely safe to uninstall the inactive versions of a duplicate port because their dependents are dependent only on the active versions? 
> 
> Have I got this right behind the scenes?

There are no symlinks involved. There used to be a system of hard links, but that was abandoned shortly after the release of Mac OS X Leopard because it caused problems for the new Time Machine feature.

What we do now is that an installed port is a compressed tarball. "Activating a port" means extracting that tarball, and "deactivating a port" means deleting the files that got extracted. "Uninstalling a port" means deleting the tarball.

The universal variant builds for multiple architectures -- x86_64 and i386 on modern systems. Not using the universal variant means using only the default architecture -- x86_64 on modern systems. So any port that was happy to use xrender without the universal variant should be just as happy to use xrender with the universal variant, since it provides the same software, just for more architectures.

The reverse is not necessarily true. You may have installed a port that requires 32-bit support, and therefore requires its dependencies to be installed with the universal variant. wine is the most common example of such a port.

Given the above list of installed ports, "sudo port reclaim" should uninstall the non-universal xrender, because it is inactive.



More information about the macports-users mailing list