Package: mlocate
Version: 0.26-2
Severity: minor

mlocate's feature of allowing for multiple locate databases is highly
valuable in the case of shared filesystems.  Problem is mlocate stores
the *complete* path in the locate database.  This is a problem if some
systems mount the filesystem in different places than others.

A fileserver might store home directories in /disk/home0, /disk/home1,
etc.  Whereas client systems may mount all of them in subdirectories of
/home.  In such case `locate some_user_file` would report
/disk/home#/luser/some_user_file even on a client machine when the
file would be found at /home/luser/some_user_file.

Two approaches come to mind, if -o and -U are used, remove the common
prefix of those files and flag in the database to add the path to the
database to reportted files.  ie do
`updatedb -o /disk/home#/luser/.mlocate.db -U /disk/home#/luser`, have
"/disk/home#/" not in the DB, but when /home/luser/.mlocate.db is
examined add "/home/luser/" added.

The other approach is to add an option for doing path substitution
during DB creation.  Perhaps "-c11,/home" to strip 11 characters and
then add "/home" (-c is inspired by `cut`).

I'm putting this in as "minor" since this is a crucial missing feature
for many installations.  This makes `locate` sort of work in large
installations.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sig...@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445

Reply via email to