> On Nov 18, 2021, at 9:47 AM, Eric Gallager via macports-users > <[email protected]> wrote: > > On Thu, Nov 18, 2021 at 3:02 AM Ryan Schmidt <[email protected]> wrote: >> >> 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. >> > > Didn't MacPorts start doing `chflags hidden` on > /opt/local/var/macports at some point to stop Spotlight from indexing > it? If it wasn't actually to stop Spotlight from indexing it, then why > hide it? Also Fink makes Spotlight avoid its build directory by giving > it a `.build` suffix; apparently a `.noindex` suffix ought to work, > too; I've thought for a while that MacPorts should use one of these > suffixes as well. Also Fink supplies a package that provides an > importer that allows Spotlight to index its info files, which is > something that I've wondered if it could be ported to MacPorts to > create an `.mdimporter` for Portfiles, too: > https://github.com/fink/fink-distributions/blob/4b95ece57eb9acdf68b7d4390914b59e16370bff/10.4/stable/main/finkinfo/devel/finkinfofile.info
There was some discussion of alternative ways to avoid indexing, all the way back in 2014: https://www.mail-archive.com/[email protected]/msg26538.html <https://www.mail-archive.com/[email protected]/msg26538.html> Craig
