Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Richard L. Hamilton
Mos Applie-supplied command line tools and C programming interfaces are in man 
pages, the latter only if you have Xcode and/or command line developer tools 
installed (and those aren't on the default search path for the man command, so 
finding them might be non-obvious). Some command line programs are pretty much 
undocumented, you just have to google, typically finding where someone was 
complaining about them using too much CPU. :-)

Most Apple-supplied GUI tools have some built-in help. Apple programming 
interfaces intended to be public (not all are) that are Objective C or Swift 
have documentation on their developer website, along with a few other odds and 
ends probably.

The way man pages and the documentation on the Apple developer website are 
written is somewhat different. Someone familiar with one might not be so 
comfortable with the other, and vice versa. Man pages go all the way back to 
very early Unix systems which were used for typesetting, and could both 
recompile themselves and typeset their own documentation (pretty impressive on 
something far less powerful - if more general purpose - than an Apple Watch 
today is), including man pages but also some slightly more tutorial 
documentation. Documentation not part of man pages mostly (except for IBM 
mainframes and a few other systems that have been around for ages) has writing 
styles and structure that is typically much more recent. Man pages (and a lot 
of IBM mainframe documentation) are REFERENCE; they assume you already know 
more or less what does what, and just want to get the details right. They're 
not remotely meant to be an overview or tutorial, at least not unless you read 
a lot of them and try everything that doesn't look too dangerous. :-) Or read 
the OS source code, which is right (in terms of what actually  happens) even if 
the documentation isn't.


> On Nov 17, 2021, at 16:37, Dave Horsfall  wrote:
> 
> On Wed, 17 Nov 2021, Bill Cole wrote:
> 
>>> Where are all these obscure commands documented?
>> 
>> /usr/share/man/man1/ and /usr/share/man/man8/ mostly...
> 
> Perhaps I should've expressed it better :-)
> 
> I've found all sorts of obscure commands (such as "security" and the 
> aforementioned "mdutil") mentioned on this list; now, how am I supposed to 
> know that they existed in the first place?  I cannot find any sign of an 
> admin guide, and this 2nd-hand MacPro did not come with media.
> 
> It seems that I have to look at all the manfiles and wonder what they do...
> 
>> FWIW, 'apropos spotlight' will tell you that mdutil and mddiagnose exist.
> 
> Sure, but my query was more of a general nature.
> 
> -- Dave
> 

-- 
eMail:  mailto:rlha...@smart.net






Qt6 Creator availability?

2021-11-17 Thread André-John Mas
Hi,

I see Qt6 has now been added to MacPorts, but I don't see a Qt6 version of Qt 
Creator.

Can I make a request to get this added?

Thanks

Andre

Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread raf
On Thu, Nov 18, 2021 at 08:37:17AM +1100, Dave Horsfall  
wrote:

> On Wed, 17 Nov 2021, Bill Cole wrote:
> 
> > > Where are all these obscure commands documented?
> > 
> > /usr/share/man/man1/ and /usr/share/man/man8/ mostly...
> 
> Perhaps I should've expressed it better :-)
> 
> I've found all sorts of obscure commands (such as "security" and the
> aforementioned "mdutil") mentioned on this list; now, how am I supposed to
> know that they existed in the first place?  I cannot find any sign of an
> admin guide, and this 2nd-hand MacPro did not come with media.
> 
> It seems that I have to look at all the manfiles and wonder what they do...
> 
> > FWIW, 'apropos spotlight' will tell you that mdutil and mddiagnose
> > exist.
> 
> Sure, but my query was more of a general nature.
> 
> -- Dave

That's a good question. I have no idea either. I came
across the "security" tool as a result of searching how
to deal with the expired certificate (i.e. cargo culting).
I did get an O'Reilly book once called "Mac OS X Tiger
for Unix Geeks" but never got around to reading it.
There's also:

  Mac OS X For Unix Geeks, 4th Edition (2008)
  MAC OS X UNIX Toolbox: 1000+ Commands for the Mac OS X (2009)
  Learning Unix for OS X, 2nd Edition (2016)
  Take Control of the Mac Command Line with Terminal, 3rd Edition (2021)

I have no idea what they cover.

cheers,
raf



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread André-John Mas
Either by trying to find an answer on the internet, where it was documented, 
someone else discovered it or already knew how to do something with the given 
command,
or using:

man -k 

such as:

man -k spotlight

So in short, using the man command or an internet search.


> On 17 Nov, 2021, at 16:37, Dave Horsfall  wrote:
> 
> On Wed, 17 Nov 2021, Bill Cole wrote:
> 
>>> Where are all these obscure commands documented?
>> 
>> /usr/share/man/man1/ and /usr/share/man/man8/ mostly...
> 
> Perhaps I should've expressed it better :-)
> 
> I've found all sorts of obscure commands (such as "security" and the 
> aforementioned "mdutil") mentioned on this list; now, how am I supposed to 
> know that they existed in the first place?  I cannot find any sign of an 
> admin guide, and this 2nd-hand MacPro did not come with media.
> 
> It seems that I have to look at all the manfiles and wonder what they do...
> 
>> FWIW, 'apropos spotlight' will tell you that mdutil and mddiagnose exist.
> 
> Sure, but my query was more of a general nature.
> 
> -- Dave



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Peter Hancock

On 17/11/2021 20:06, Dave Horsfall wrote:

On Wed, 17 Nov 2021, Peter Hancock wrote:


On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports"
evokes:


[...]

Where are all these obscure commands documented?


I came across them from googled-up places like stack-exchange and whatnot.
Wondering what mdutil did, I tried mdutil --help.

That produces an almost perfectly inscrutable parody of "help",
as does man mdutil, etc.

I would *not* recommend experimenting with the various options of mdutil,
unless extravagently backed-up.
On my system, some rash command involving the "-E" option immediately blew
away the bar at the screen-top, plus any access by the keyboard, mouse, or 
ethernet. Thinking it
might actually be doing something, I went to bed. In the morning it was the
same, so with crossed fingers, I cycled the power. By a blessed miracle
it rebooted into my usual system.

This doesn't have anything much to do with macports itself, but
I think I have managed (with the magic keystroke) to stop Spotlight from 
indexing
/opt/local/var/macports






Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Dave Horsfall

On Wed, 17 Nov 2021, Bill Cole wrote:


Where are all these obscure commands documented?


/usr/share/man/man1/ and /usr/share/man/man8/ mostly...


Perhaps I should've expressed it better :-)

I've found all sorts of obscure commands (such as "security" and the 
aforementioned "mdutil") mentioned on this list; now, how am I supposed to 
know that they existed in the first place?  I cannot find any sign of an 
admin guide, and this 2nd-hand MacPro did not come with media.


It seems that I have to look at all the manfiles and wonder what they 
do...


FWIW, 'apropos spotlight' will tell you that mdutil and mddiagnose 
exist.


Sure, but my query was more of a general nature.

-- Dave


Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Bill Cole
On 2021-11-17 at 15:06:23 UTC-0500 (Thu, 18 Nov 2021 07:06:23 +1100 (EST))
Dave Horsfall 
is rumored to have said:

> On Wed, 17 Nov 2021, Peter Hancock wrote:
>
>> On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports"
>> evokes:
>
> [...]
>
> Where are all these obscure commands documented?

/usr/share/man/man1/ and /usr/share/man/man8/ mostly...

FWIW, 'apropos spotlight' will tell you that mdutil and mddiagnose exist.





-- 
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Sriranga Veeraraghavan
Long ago, I was told that Spotlight would not index a folder and its subfolders 
if the file .metadata_never_index was present.  I can’t vouch for this (mostly 
because I generally disable Spotlight), but it is perhaps something that 
someone can try and see if works, for example:

$ sudo touch /opt/local/.metadata_never_index

Also, I think there is some programmatic / CLI way to add folders to the 
excluded list because if you have Roxio Toast installed, it adds some folders 
to the Privacy list that shows up in System Preferences.

Thanks,

-ranga

> On Nov 17, 2021, at 11:49, Richard L. Hamilton  wrote:
> 
> 
> 
>> On Nov 17, 2021, at 14:16, André-John Mas > > wrote:
>> 
>> When looking at "System Preferences -> Spotlight -> Privacy", you can 
>> configure exclusions by folder.
>> 
>> I had a look at the mdutil command and no reference to folders or paths is 
>> mentioned, when looking from macOS 12.0.1:
>> 
>> Usage: mdutil -pEsa -i (on|off) -d volume ...
>>mdutil -t {volume-path | deviceid} fileid
>>  Utility to manage Spotlight indexes.
>>  -i (on|off)Turn indexing on or off.
>>  -d Disable Spotlight activity for volume (re-enable using 
>> -i on).
>>  -E Erase and rebuild index.
>>  -s Print indexing status.
>>  -a Apply command to all stores on all volumes.
>>  -t Resolve files from file id with an optional volume path 
>> or device id.
>>  -p Publish metadata.
>>  -V vol Apply command to all stores on the specified volume.
>>  -v Display verbose information.
>>  -r plugins Ask the server to reimport files for UTIs claimed by the 
>> listed plugin.
>>  -L volume-path List the directory contents of the Spotlight index on 
>> the specified volume.
>>  -P volume-path Dump the VolumeConfig.plist for the specified volume.
>>  -X volume-path Remove the Spotlight index directory on the specified 
>> volume.  Does not disable indexing.
>> Spotlight will reevaluate volume when it is unmounted 
>> and remounted, the
>> machine is rebooted, or an explicit index command such 
>> as 'mdutil -i' or 'mdutil -E' is
>> run for the volume.
>> NOTE: Run as owner for network homes, otherwise run as root.
>> 
>> I am starting to wonder if there is another command we should be using, in 
>> place of mdutil?
> 
> As I implied before, I don't think there's an md* command or even a public 
> API to add or edit the folders to exclude. Rather, I suspect that the 
> Spotlight preference pane has some private interface to do the job.
> 
> I could probably figure out how to do that using the "defaults" command and 
> tell you, but I won't, because the risk of corrupting that file and possibly 
> breaking Spotlight for that volume is one I won't encourage. Figure it out 
> yourself if you're willing to risk shooting yourself in the foot. Looking a 
> bit at the executable for the preference pane, I don't quite see what it does 
> (it doesn't seem to directly edit the 
> .Spotlight-V100/VolumeConfiguration.plist file for the volume (I think that 
> tree exists per-volume, not just one for the whole system), but I haven't 
> looked closely to determine more), but it seems that it may at least take 
> some precautions you might not - there seems to be some check for paths that 
> might break (presumably Apple-supplied - they couldn't know what other apps 
> do) apps that depend on Spotlight access to certain directories.
> 
> So I agree that MacPorts shouldn't exclude its noisy (with respect to 
> Spotlight updates) directory automatically. If it's a performance problem, 
> it's easily enough done through the preference pane.
> 



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Dave Horsfall

On Wed, 17 Nov 2021, Peter Hancock wrote:


On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports"
evokes:


[...]

Where are all these obscure commands documented?

-- Dave


Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread André-John Mas
Agree with all this. Maybe just something to add to the docs or FAQ?

André-John

Sent from my phone. Envoyé depuis mon téléphone. 

> On 17 Nov 2021, at 14:49, Richard L. Hamilton  wrote:
> 
> 
> 
>> On Nov 17, 2021, at 14:16, André-John Mas  wrote:
>> 
>> When looking at "System Preferences -> Spotlight -> Privacy", you can 
>> configure exclusions by folder.
>> 
>> I had a look at the mdutil command and no reference to folders or paths is 
>> mentioned, when looking from macOS 12.0.1:
>> 
>> Usage: mdutil -pEsa -i (on|off) -d volume ...
>>mdutil -t {volume-path | deviceid} fileid
>>  Utility to manage Spotlight indexes.
>>  -i (on|off)Turn indexing on or off.
>>  -d Disable Spotlight activity for volume (re-enable using 
>> -i on).
>>  -E Erase and rebuild index.
>>  -s Print indexing status.
>>  -a Apply command to all stores on all volumes.
>>  -t Resolve files from file id with an optional volume path 
>> or device id.
>>  -p Publish metadata.
>>  -V vol Apply command to all stores on the specified volume.
>>  -v Display verbose information.
>>  -r plugins Ask the server to reimport files for UTIs claimed by the 
>> listed plugin.
>>  -L volume-path List the directory contents of the Spotlight index on 
>> the specified volume.
>>  -P volume-path Dump the VolumeConfig.plist for the specified volume.
>>  -X volume-path Remove the Spotlight index directory on the specified 
>> volume.  Does not disable indexing.
>> Spotlight will reevaluate volume when it is unmounted 
>> and remounted, the
>> machine is rebooted, or an explicit index command such 
>> as 'mdutil -i' or 'mdutil -E' is
>> run for the volume.
>> NOTE: Run as owner for network homes, otherwise run as root.
>> 
>> I am starting to wonder if there is another command we should be using, in 
>> place of mdutil?
> 
> As I implied before, I don't think there's an md* command or even a public 
> API to add or edit the folders to exclude. Rather, I suspect that the 
> Spotlight preference pane has some private interface to do the job.
> 
> I could probably figure out how to do that using the "defaults" command and 
> tell you, but I won't, because the risk of corrupting that file and possibly 
> breaking Spotlight for that volume is one I won't encourage. Figure it out 
> yourself if you're willing to risk shooting yourself in the foot. Looking a 
> bit at the executable for the preference pane, I don't quite see what it does 
> (it doesn't seem to directly edit the 
> .Spotlight-V100/VolumeConfiguration.plist file for the volume (I think that 
> tree exists per-volume, not just one for the whole system), but I haven't 
> looked closely to determine more), but it seems that it may at least take 
> some precautions you might not - there seems to be some check for paths that 
> might break (presumably Apple-supplied - they couldn't know what other apps 
> do) apps that depend on Spotlight access to certain directories.
> 
> So I agree that MacPorts shouldn't exclude its noisy (with respect to 
> Spotlight updates) directory automatically. If it's a performance problem, 
> it's easily enough done through the preference pane.
> 


Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Richard L. Hamilton


> On Nov 17, 2021, at 14:16, André-John Mas  wrote:
> 
> When looking at "System Preferences -> Spotlight -> Privacy", you can 
> configure exclusions by folder.
> 
> I had a look at the mdutil command and no reference to folders or paths is 
> mentioned, when looking from macOS 12.0.1:
> 
> Usage: mdutil -pEsa -i (on|off) -d volume ...
>mdutil -t {volume-path | deviceid} fileid
>   Utility to manage Spotlight indexes.
>   -i (on|off)Turn indexing on or off.
>   -d Disable Spotlight activity for volume (re-enable using 
> -i on).
>   -E Erase and rebuild index.
>   -s Print indexing status.
>   -a Apply command to all stores on all volumes.
>   -t Resolve files from file id with an optional volume path 
> or device id.
>   -p Publish metadata.
>   -V vol Apply command to all stores on the specified volume.
>   -v Display verbose information.
>   -r plugins Ask the server to reimport files for UTIs claimed by the 
> listed plugin.
>   -L volume-path List the directory contents of the Spotlight index on 
> the specified volume.
>   -P volume-path Dump the VolumeConfig.plist for the specified volume.
>   -X volume-path Remove the Spotlight index directory on the specified 
> volume.  Does not disable indexing.
>  Spotlight will reevaluate volume when it is unmounted 
> and remounted, the
>  machine is rebooted, or an explicit index command such 
> as 'mdutil -i' or 'mdutil -E' is
>  run for the volume.
> NOTE: Run as owner for network homes, otherwise run as root.
> 
> I am starting to wonder if there is another command we should be using, in 
> place of mdutil?

As I implied before, I don't think there's an md* command or even a public API 
to add or edit the folders to exclude. Rather, I suspect that the Spotlight 
preference pane has some private interface to do the job.

I could probably figure out how to do that using the "defaults" command and 
tell you, but I won't, because the risk of corrupting that file and possibly 
breaking Spotlight for that volume is one I won't encourage. Figure it out 
yourself if you're willing to risk shooting yourself in the foot. Looking a bit 
at the executable for the preference pane, I don't quite see what it does (it 
doesn't seem to directly edit the .Spotlight-V100/VolumeConfiguration.plist 
file for the volume (I think that tree exists per-volume, not just one for the 
whole system), but I haven't looked closely to determine more), but it seems 
that it may at least take some precautions you might not - there seems to be 
some check for paths that might break (presumably Apple-supplied - they 
couldn't know what other apps do) apps that depend on Spotlight access to 
certain directories.

So I agree that MacPorts shouldn't exclude its noisy (with respect to Spotlight 
updates) directory automatically. If it's a performance problem, it's easily 
enough done through the preference pane.



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread André-John Mas
A bit more digging gives me this following stackexchange question: 
https://apple.stackexchange.com/questions/87090/how-to-programatically-add-folder-to-spotlight-do-not-index
 


On 12.0.1 I do confirm that the folder exclusions indicated in the System 
Preferences are there: 
/System/Volumes/Data/.Spotlight-V100/VolumeConfiguration.plist

On the other hand `sudo mdutil -P /` returns a different file, while `sudo 
mdutil -P /Volumes/Macintosh\ HD` returns nothing.

Additionally, `sudo mdutil -L /Volumes/Macintosh\ HD` returns `Spotlight 
directory not found at root: /Volumes/Macintosh HD`, while `sudo mdutil -L /` 
returns:

/private/var/db/Spotlight-V100/BootVolume:
drwx--   2 0 0 64 Aug 25 2021 16:27 Store-V2
-rw---   1 0 0   4316 Aug 25 2021 16:28 
VolumeConfiguration.plist

/private/var/db/Spotlight-V100/BootVolume/Store-V2:

That's as good as I have for now.


> On 17 Nov, 2021, at 14:16, André-John Mas  wrote:
> 
> When looking at "System Preferences -> Spotlight -> Privacy", you can 
> configure exclusions by folder.
> 
> I had a look at the mdutil command and no reference to folders or paths is 
> mentioned, when looking from macOS 12.0.1:
> 
> Usage: mdutil -pEsa -i (on|off) -d volume ...
>mdutil -t {volume-path | deviceid} fileid
>   Utility to manage Spotlight indexes.
>   -i (on|off)Turn indexing on or off.
>   -d Disable Spotlight activity for volume (re-enable using 
> -i on).
>   -E Erase and rebuild index.
>   -s Print indexing status.
>   -a Apply command to all stores on all volumes.
>   -t Resolve files from file id with an optional volume path 
> or device id.
>   -p Publish metadata.
>   -V vol Apply command to all stores on the specified volume.
>   -v Display verbose information.
>   -r plugins Ask the server to reimport files for UTIs claimed by the 
> listed plugin.
>   -L volume-path List the directory contents of the Spotlight index on 
> the specified volume.
>   -P volume-path Dump the VolumeConfig.plist for the specified volume.
>   -X volume-path Remove the Spotlight index directory on the specified 
> volume.  Does not disable indexing.
>  Spotlight will reevaluate volume when it is unmounted 
> and remounted, the
>  machine is rebooted, or an explicit index command such 
> as 'mdutil -i' or 'mdutil -E' is
>  run for the volume.
> NOTE: Run as owner for network homes, otherwise run as root.
> 
> I am starting to wonder if there is another command we should be using, in 
> place of mdutil?
> 
> 
>> On 17 Nov, 2021, at 13:31, Peter Hancock > > wrote:
>> 
>> On 17/11/2021 15:46, Chris Jones wrote:
>>> Some users might find it useful, and the exact volume to exclude
>>> depends on the details of the users installation, which would be
>>> difficult to automate. So I think its fine to just leave it to be
>>> done by hand by those that wish to.
>>> On 17/11/2021 3:09 pm, André-John Mas wrote:
 Just wondering whether it would make sense for MacPorts to auto
 exclude that folder? Does spotlight even provide an API or command
 that would allow MacPorts to do that?>>
>> 
>> André-John Mas mentions folders (directories?), while Chris Jones mentions 
>> volumes
>> (mounted filesystems?).
>> 
>> On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports "
>> evokes:
>> [
>> Password:
>> /System/Volumes/Data/opt/local/var/macports:
>> Error: invalid operation.
>>  Error: unknown indexing state.
>> ]
>> 
>> Trying to drag that directory into the appropriate System Preferences 
>> "privacy" pane,
>> accomplishes nothing. It doesn't appear on the list.
>> 
>> My man page for mdutil seems to speak only about volumes. A bit of googling 
>> suggests
>> that though there *may* have been a time when you could exclude various 
>> directories
>> from spotlight indexing, by one trick or another, those days are gone.
>> 
>> Am I wrong?
>> 
>> I hope so. I'm getting pretty dyspeptic about how much of my computer seems 
>> to be
>> taken over by Spotlight and it's various underlings/minions.
>> 
>> (Eg, It/they seem(s) to spend a large chunk of resources on creating 
>> tens/hundreds of thousands
>> of empty directories deep under /private/var/folders, to no apparent 
>> purpose.)
>> 
>> 
>> 
> 



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread André-John Mas
When looking at "System Preferences -> Spotlight -> Privacy", you can configure 
exclusions by folder.

I had a look at the mdutil command and no reference to folders or paths is 
mentioned, when looking from macOS 12.0.1:

Usage: mdutil -pEsa -i (on|off) -d volume ...
   mdutil -t {volume-path | deviceid} fileid
Utility to manage Spotlight indexes.
-i (on|off)Turn indexing on or off.
-d Disable Spotlight activity for volume (re-enable using 
-i on).
-E Erase and rebuild index.
-s Print indexing status.
-a Apply command to all stores on all volumes.
-t Resolve files from file id with an optional volume path 
or device id.
-p Publish metadata.
-V vol Apply command to all stores on the specified volume.
-v Display verbose information.
-r plugins Ask the server to reimport files for UTIs claimed by the 
listed plugin.
-L volume-path List the directory contents of the Spotlight index on 
the specified volume.
-P volume-path Dump the VolumeConfig.plist for the specified volume.
-X volume-path Remove the Spotlight index directory on the specified 
volume.  Does not disable indexing.
   Spotlight will reevaluate volume when it is unmounted 
and remounted, the
   machine is rebooted, or an explicit index command such 
as 'mdutil -i' or 'mdutil -E' is
   run for the volume.
NOTE: Run as owner for network homes, otherwise run as root.

I am starting to wonder if there is another command we should be using, in 
place of mdutil?


> On 17 Nov, 2021, at 13:31, Peter Hancock  wrote:
> 
> On 17/11/2021 15:46, Chris Jones wrote:
>> Some users might find it useful, and the exact volume to exclude
>> depends on the details of the users installation, which would be
>> difficult to automate. So I think its fine to just leave it to be
>> done by hand by those that wish to.
>> On 17/11/2021 3:09 pm, André-John Mas wrote:
>>> Just wondering whether it would make sense for MacPorts to auto
>>> exclude that folder? Does spotlight even provide an API or command
>>> that would allow MacPorts to do that?>>
> 
> André-John Mas mentions folders (directories?), while Chris Jones mentions 
> volumes
> (mounted filesystems?).
> 
> On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports "
> evokes:
> [
> Password:
> /System/Volumes/Data/opt/local/var/macports:
> Error: invalid operation.
>   Error: unknown indexing state.
> ]
> 
> Trying to drag that directory into the appropriate System Preferences 
> "privacy" pane,
> accomplishes nothing. It doesn't appear on the list.
> 
> My man page for mdutil seems to speak only about volumes. A bit of googling 
> suggests
> that though there *may* have been a time when you could exclude various 
> directories
> from spotlight indexing, by one trick or another, those days are gone.
> 
> Am I wrong?
> 
> I hope so. I'm getting pretty dyspeptic about how much of my computer seems 
> to be
> taken over by Spotlight and it's various underlings/minions.
> 
> (Eg, It/they seem(s) to spend a large chunk of resources on creating 
> tens/hundreds of thousands
> of empty directories deep under /private/var/folders, to no apparent purpose.)
> 
> 
> 



Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Richard L. Hamilton
I also haven't found an intended command line way or program API to add a 
directory to exclude from Spotlight. (they are buried in a plist file in the 
Spotlight data directory for the particular mount point, and one could use 
command line tools to add it there, but I would NOT recommend risking it)

But in System Preferences ->Spotlight->Privacy tab, the usual command-shift-G 
type the path works just fine to set a directory (not needing to be a volume 
mount point) to exclude. That's probably needed because /opt/local/var/macports 
has the Finder invisible flag set.

> On Nov 17, 2021, at 13:31, Peter Hancock  wrote:
> 
> On 17/11/2021 15:46, Chris Jones wrote:
>> Some users might find it useful, and the exact volume to exclude
>> depends on the details of the users installation, which would be
>> difficult to automate. So I think its fine to just leave it to be
>> done by hand by those that wish to.
>> On 17/11/2021 3:09 pm, André-John Mas wrote:
>>> Just wondering whether it would make sense for MacPorts to auto
>>> exclude that folder? Does spotlight even provide an API or command
>>> that would allow MacPorts to do that?>>
> 
> André-John Mas mentions folders (directories?), while Chris Jones mentions 
> volumes
> (mounted filesystems?).
> 
> On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports "
> evokes:
> [
> Password:
> /System/Volumes/Data/opt/local/var/macports:
> Error: invalid operation.
>   Error: unknown indexing state.
> ]
> 
> Trying to drag that directory into the appropriate System Preferences 
> "privacy" pane,
> accomplishes nothing. It doesn't appear on the list.
> 
> My man page for mdutil seems to speak only about volumes. A bit of googling 
> suggests
> that though there *may* have been a time when you could exclude various 
> directories
> from spotlight indexing, by one trick or another, those days are gone.
> 
> Am I wrong?
> 
> I hope so. I'm getting pretty dyspeptic about how much of my computer seems 
> to be
> taken over by Spotlight and it's various underlings/minions.
> 
> (Eg, It/they seem(s) to spend a large chunk of resources on creating 
> tens/hundreds of thousands
> of empty directories deep under /private/var/folders, to no apparent purpose.)
> 
> 
> 

-- 
eMail:  mailto:rlha...@smart.net






Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Peter Hancock

On 17/11/2021 15:46, Chris Jones wrote:


Some users might find it useful, and the exact volume to exclude
depends on the details of the users installation, which would be
difficult to automate. So I think its fine to just leave it to be
done by hand by those that wish to.

On 17/11/2021 3:09 pm, André-John Mas wrote:

Just wondering whether it would make sense for MacPorts to auto
exclude that folder? Does spotlight even provide an API or command
that would allow MacPorts to do that?>>


André-John Mas mentions folders (directories?), while Chris Jones mentions 
volumes
(mounted filesystems?).

On Catalina, for me the command "sudo mdutil -i off /opt/local/var/macports "
evokes:
[
Password:
/System/Volumes/Data/opt/local/var/macports:
Error: invalid operation.
Error: unknown indexing state.
]

Trying to drag that directory into the appropriate System Preferences "privacy" 
pane,
accomplishes nothing. It doesn't appear on the list.

My man page for mdutil seems to speak only about volumes. A bit of googling 
suggests
that though there *may* have been a time when you could exclude various 
directories
from spotlight indexing, by one trick or another, those days are gone.

Am I wrong?

I hope so. I'm getting pretty dyspeptic about how much of my computer seems to 
be
taken over by Spotlight and it's various underlings/minions.

(Eg, It/they seem(s) to spend a large chunk of resources on creating 
tens/hundreds of thousands
of empty directories deep under /private/var/folders, to no apparent purpose.)





Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread Chris Jones



Some users might find it useful, and the exact volume to exclude depends 
on the details of the users installation, which would be difficult to 
automate. So I think its fine to just leave it to be done by hand by 
those that wish to.


On 17/11/2021 3:09 pm, André-John Mas wrote:
Just wondering whether it would make sense for MacPorts to auto exclude 
that folder? Does spotlight even provide an API or command that would 
allow MacPorts to do that?


André-John

Sent from my phone. Envoyé depuis mon téléphone.


On 16 Nov 2021, at 21:03, Richard L. Hamilton  wrote:

Good, thanks. Perhaps I wouldn't exclude the whole /opt/local (or 
whatever install prefix) unless performance is a major issue, but 
/opt/local/var/macports, which is less likely to be interesting in 
terms of commands or configuration files or documentation, and both 
large (mine is 24GiB when the entire /opt/local is only 35GiB - and I 
frequently remove most inactive ports and run a port clean installed) 
and active in terms of changes.


On Nov 16, 2021, at 16:06, Chris Jones > wrote:



I am not aware of any use macports itself makes of spotlight, so for 
sure if you don’t plan on using it yourself to search the install 
prefix, you can disable it.


On 16 Nov 2021, at 6:26 am, Richard L. Hamilton > wrote:


Seems it'd thrash Spotlight a lot less during "port selfupdate" or 
"port upgrade outdated" to exclude /opt/local, as long as that 
wouldn't break anything (obviously one couldn't then use Spotlight 
to search /opt/local, but that's ok with me).





--
eMail:mailto:rlha...@smart.net 






Re: Does MacPorts depend on Spotlight?

2021-11-17 Thread André-John Mas
Just wondering whether it would make sense for MacPorts to auto exclude that 
folder? Does spotlight even provide an API or command that would allow MacPorts 
to do that?

André-John

Sent from my phone. Envoyé depuis mon téléphone. 

> On 16 Nov 2021, at 21:03, Richard L. Hamilton  wrote:
> 
> Good, thanks. Perhaps I wouldn't exclude the whole /opt/local (or whatever 
> install prefix) unless performance is a major issue, but 
> /opt/local/var/macports, which is less likely to be interesting in terms of 
> commands or configuration files or documentation, and both large (mine is 
> 24GiB when the entire /opt/local is only 35GiB - and I frequently remove most 
> inactive ports and run a port clean installed) and active in terms of changes.
> 
>> On Nov 16, 2021, at 16:06, Chris Jones  wrote:
>> 
>> 
>> I am not aware of any use macports itself makes of spotlight, so for sure if 
>> you don’t plan on using it yourself to search the install prefix, you can 
>> disable it.
>> 
 On 16 Nov 2021, at 6:26 am, Richard L. Hamilton  wrote:
 
>>> Seems it'd thrash Spotlight a lot less during "port selfupdate" or "port 
>>> upgrade outdated" to exclude /opt/local, as long as that wouldn't break 
>>> anything (obviously one couldn't then use Spotlight to search /opt/local, 
>>> but that's ok with me).
>>> 
>>> 
> 
> -- 
> eMail:mailto:rlha...@smart.net
> 
> 
> 
>