To speed-up the solution, I edited /etc/weekly:

> echo "${UPDATEDB} --fcodes=- --searchpaths=\"/usr /etc\""  | \

Considering that a generic system may have large mounted storage devices, I 
think that SEARCHPATHS ought to be narrowed to relevant folders by default.

--OC

Sent with Proton Mail secure email.

On Saturday, May 17th, 2025 at 5:52 PM, otto.cooper <otto.coo...@proton.me> 
wrote:

> If I call /usr/libexec/locate.updatedb directly, the problem does not occur.
> 
> When called by /etc/weekly, the problem occurs.
> 
> 
> 
> Sent with Proton Mail secure email.
> 
> 
> On Saturday, May 17th, 2025 at 5:37 PM, otto.cooper otto.coo...@proton.me 
> wrote:
> 
> > Side note
> > 
> > old minimal:
> > 
> > > SEARCHPATHS="/usr /var"
> > 
> > new minimal:
> > 
> > > SEARCHPATHS="/usr /etc"
> > 
> > because /etc/weekly tests itself.
> > 
> > Sent with Proton Mail secure email.
> > 
> > On Saturday, May 17th, 2025 at 5:30 PM, otto.cooper otto.coo...@proton.me 
> > wrote:
> > 
> > > The file /usr/libexec/locate.updatedb defines SEARCHPATHS as "/".
> > > The same file defines a way to configure its operations, by reading 
> > > LOCATE_CONFIG="/etc/locate.rc",
> > > from which SEARCHPATHS can be re-refined in locate.rc or specified as 
> > > --searchpaths.
> > > 
> > > To avoid indexing large mounted volumes, as well as to focus the locate 
> > > database, I re-refined SEARCHPATHS in /etc/locate.rc:
> > > 
> > > > SEARCHPATHS="/usr /var"
> > > 
> > > However, /usr/libexec/locate.updatedb ignores the configuration file.
> > > 
> > > This is what I see at runtime, where find is clearly running on the 
> > > default vaule of SEARCHPATHS:
> > > 
> > > > find / ! ( -fstype ffs -or -fstype ufs ) -prune -or -path /tmp -prune 
> > > > -or -path /var/tmp -prune -or -print
> > > 
> > > This is the end result:
> > > 
> > > > Rebuilding locate database:
> > > > /tmp: write failed, file system is full
> > > > sort: No space left on device
> > > > locate.mklocatedb: cannot build locate database
> > > > locate: database too small: /var/db/locate.database.slJhKwjajQ
> > > > Not installing invalid locate database
> > > 
> > > where "sort" is called by /usr/libexec/locate.mklocatedb, which is called 
> > > by /usr/libexec/locate.updatedb.
> > > 
> > > Is anybody else having this problem?

Reply via email to