understand $LOCATE_PATH=~/.locatedb and do... something better
Reported downstream on Debian. #1000429
catfish has a hard-coded path to mlocate's default database path:
https://codesearch.debian.net/search?q=pkg%3Acatfish+mlocate&literal=1
https://sources.debian.org/src/catfish/4.16.3-1/catfish_lib/catfishconfig.py/#L32
mlocate and plocate support $LOCATE_PATH being a colon-separated list of paths to locate databases:
https://manpages.debian.org/bullseye-backports/plocate/plocate.1.en.html#ENVIRONMENT
I use this to run updatedb directly on the NAS, which is MUCH more efficient. The commands are approximately this:
# on the file server, generate ~twb/.locatedb
sudo -H -u twb nice nocache updatedb --require-visibility=no --output .locatedb --database-root ~twb
# on the desktop, where ~twb is NFS and / is Debian Live
export LOCATE_PATH=~twb/.locatedb
locate foo
catfish
I think with Debian 11's catfish, it will ALWAYS pop up this alert:
The search database is more than 7 days old. Update now? [Update] [X]
I'm not sure EXACTLY what the correct semantics here should be, but the current behaviour is definitely annoying me! :-)