Does MacPorts depend on Spotlight?

Ryan Schmidt ryandesign at macports.org
Thu Nov 18 08:01:41 UTC 2021


MacPorts base doesn't do anything with Spotlight. It doesn't depend on it existing, nor does it tell Spotlight to index or not to index anything. MacPorts predates the existence of Spotlight.

As far as I know, ports don't depend on Spotlight having indexed the MacPorts prefix or the build directory. On the MacPorts buildbot machines, I exclude /opt/local and /Applications/MacPorts from the Spotlight index in order to reduce disk writes. As far as I know, this hasn't caused any build failures.

I do recall at least one port where we discovered that it was using `mdfind` (the command line utility for finding files using the Spotlight index) to find something it needed (Xcode, if I recall), and this failed for a user who had excluded either /Applications or maybe their whole disk from Spotlight or turned Spotlight off entirely, so I don't recommend doing that.



More information about the macports-users mailing list