bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findutils -- feature request for database with relative pathnames


From: Miloslav Trmač
Subject: Re: findutils -- feature request for database with relative pathnames
Date: Sat, 06 Sep 2008 15:33:18 +0000

Hello,
just a few comments based on my (unrealized) plans to implement
something similar for mlocate:

Peter Breitenlohner píše v Pá 05. 09. 2008 v 15:57 +0200:
> 2.1 The database format is not modified but slightly reinterpreted as
> follows: The current implementation cannot contain an empty filename.
> Thus, adding a dummy empty filename as first database entry can signal
> to locate that a database contains relative filenames.
Does this leave any room for future extensions of the file format?

> We require that the database is a file in the top-level directory
> (/SERVERPATH, /CLIENTPATH1, resp. /CLIENTPATH2) and thus locate can
> deduce the required filename prefix from the directory part of the
> database name.
It would be more extensible to encode the relative path of the database
from the top-level directory (e.g. encode ".locatedb"
in /SERVERPATH/.locatedb).  Some people are concerned about littering
the root of the filesystem with similar FS-specific files, this would
allow eventually storing all such files in ./.per-fs.  I'm not sure
whether this is overengineering.

> 2.2 A new commandline option for updatedb (e.g., --relpath=PREFIX)
> causes the creation of databases with relative filenames. This option
> would be incompatible with --old-format and --netpaths, and would
> require that --output=DBFILE and --localpaths='DIR1 DIR2...' specify
> explicitly relative paths. The option --relpath=PREFIX would imply
> --changecwd=PREFIX and an explicit --changecwd would be either ignored
> or be an error.
The same feature can be used for handling clustered file systems, e.g.
GFS.  In that case there is no dedicated server, and it seems reasonable
to run updatedb on all nodes.  updatedb would need a locking mechanism
to prevent two nodes running updatedb simultaneously.  (That can be
added anytime later.)


It might make sense to automatically look for a database on every
mounted file system (assuming a specific relative path).  I don't know
whether it should be the default.
        Mirek





reply via email to

[Prev in Thread] Current Thread [Next in Thread]