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

Re: Proposal: plocate as standard for bookworm



Steinar H. Gunderson wrote:
> On Sat, Feb 06, 2021 at 10:16:29PM -0800, Josh Triplett wrote:
> > locate is a purely user-facing tool,
> > not really usable for portable scripting, since neither its presence nor
> > its functioning can be assumed.
> 
> Really? Basic functionality is the same between locate.findutils, mlocate and
> plocate. Its presence can be resolved by... well, making it Priority:
> standard. :-)

That doesn't make it usable for portable scripting. A script can't
assume the presence of locate without declaring a dependency on it, and
there's currently no virtual package for locate. And even if locate is
present, a script can't assume that it'll return useful results, because
it may not have an updated database, or even have a database initialized
at all.

> > Many users won't even know it exists
> > (locate has far fewer users than find), and for all of those non-users,
> > the effort spent building the database will go entirely to waste.
> 
> Sure, but that waste is fairly small. On a typical system, you're using a few
> seconds every night.

Statistics elsewhere in this thread suggest that it's not that cheap
even on a fast system with an SSD. It's likely to be slower on systems
with spinning disks. That's leaving aside the effect on caches.

That may be a reasonable cost to pay for users who actively use locate.
It's not a cost we should impose on the majority of Debian installations
just so that someone can run locate without installing it first.

The defaults need to cater for 1) the broadest set of users, and 2)
users who are less likely to change the defaults. Most users don't run
locate, and those who do are more likely to be users who can and do
change the defaults. `apt install plocate` isn't hard for someone who
uses locate to do.

I think you've made a compelling case for plocate being the default
locate. And that already seems to be the case: plocate provides a
higher-priority alternative than mlocate or locate.

What is the net benefit of having plocate installed by default (that
isn't available by installing it)? What is the net drawback? Why does
the former outweigh the latter?

> > Furthermore, any mechanism they use to configure one of them
> > (e.g. for privacy or performance reasons) will not control the other,
> > and again they may well be unaware of the existence of the other one.
> 
> I'm not sure what privacy reasons you're referring to? I'm not aware that
> neither mlocate/plocate nor e.g. tracker will leak data across users.

It's a database of files that previously existed on the system. If users
are unaware of that database, it may leak information they did not
expect. For instance, after deleting a file or unmounting a device, the
locate database may still have a record of such files.


Reply to: