Does MacPorts depend on Spotlight?

Richard L. Hamilton rlhamil at smart.net
Thu Nov 18 15:20:18 UTC 2021


sh-3.2$ ls -ld at O /opt/local/var/macports
drwxr-xr-x@ 13 root  wheel  - 416 Apr 16  2021 /opt/local/var/macports
	com.apple.FinderInfo	 32 

sh-3.2$ lsmac /opt/local/var
[...]
I-----   11 items          -     macports/ 
[...]

Mine doesn't have the BSD (Windows compatibility) hidden flag, but it does have the Finder info "invisible" flag ( the "I" on the left in the 2nd output shown above) - two different things, no idea why both exist, probably compatibility).

I've never before seen mention of either flag blocking Spotlight in discussions of ways to block Spotlight from indexing certain files or folders/directories.


> On Nov 18, 2021, at 09:47, Eric Gallager <egall at gwmail.gwu.edu> wrote:
> 
> On Thu, Nov 18, 2021 at 3:02 AM Ryan Schmidt <ryandesign at macports.org> 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
> 

-- 
eMail:				mailto:rlhamil at smart.net




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20211118/3ef4c70a/attachment.htm>


More information about the macports-users mailing list