#2 wishlist: prune by base name as well as full path
Closed: Fixed None Opened 11 years ago by adeodato.

This comes from Debian [http://bugs.debian.org/473891 bug#473891]:

-8<-
I'd like to be able to say something like:

PRUNENAMES=".bzr .git"

... in updatedb.conf to stop updatedb indexing revision control metadata
that tends to consist of lots of small files with barely-meaningful
names that I never want to find using locate. Unfortunately it seems
that I can only prune exact full paths, not components.

It looks like findutils used to support this by interpreting PRUNEPATHS
as regexes which it passed to find, although I never needed this feature
when I was still using updatedb from findutils. Apparently neither
slocate nor mlocate supports this.

Thanks,
->8-


Thanks for your report.

The feature sounds reasonable, and should be quite easy to implement - basically, add a bsearch() to scan().

Care to prepare a patch? I'm sure I'll get around to implementing it eventually, but not having to implement it would obviously speed the process up :)

Implemented in r112.

Metadata Update from @mitr:
- Issue assigned to mitr

2 years ago

Login to comment on this ticket.

Metadata