/opt/local/macports/software

Ryan Schmidt ryandesign at macports.org
Mon Jan 19 17:31:50 PST 2015


On Jan 19, 2015, at 7:15 PM, René J.V. Bertin wrote:

> On Monday January 19 2015 17:21:14 Ryan Schmidt wrote:
> 
>> Spotlight would find items in the /opt/local/var/macports/software directory. So when you were trying to launch an application in /Applications/MacPorts, it might find the copy in /opt/local/var/macports/software instead, which might not work.
> 
> That was before macports/software contained tarballs, I presume.

Correct, that's what we're talking about here: the problems with /opt/local/var/macports/software containing "images" (directories containing the actual files), and why we changed MacPorts to use "archives" (compressed tarballs) instead.


>> That would be a possible solution for the Spotlight issues but not for the Time Machine issues.
> 
> Why not for Time Machine? It can't (or rather, couldn't) make duplicate backups if one of the 2 sources is in an excluded directory, yes?

Which directory would you exclude?

If you exclude /opt/local/var/macports/software, then you cannot restore that directory from backups and you'll have a broken MacPorts installation (one which cannot re-activate deactivated ports).

If you exclude the "real" installation directory, that means excluding all of MacPorts i.e. /opt/local and /Applications/MacPorts.

With "images", not only were all the MacPorts-installed files backed up twice, taking twice the disk space, but if you restored such a backup, then the files would be duplicated on your real machine too.

The reasons for switching from "images" to "archives" all those years ago were sound, we don't need to re-hash this discussion again.


>> I also do not know what would happen if a user who already has ports installed with bz2 archives suddenly changes the archive format to xz (or, more generally, makes any change to the archive format). Would MacPorts still know how to find the existing archive and remove it when a port is uninstalled or upgraded?
> 
> I suppose there is normally only 1 tarball per installed version or variant, so the search algorithm could omit the compressor extension from the search pattern. 

Yes, solutions could be invented. I'm questioning whether we already have a solution coded. If not, that's more code someone would have to write and test.


>>> What parts of ${prefix}/var/macports are used during normal operation, so as long as you don't use the port command?
>> 
>> None. That directory is for the port command to use, and nobody else.
> 
> So it could indeed be on a removable/external drive that's mounted only for port maintenance.

It's conceivable, but not tested by me.



More information about the macports-users mailing list