On Tue, 27 May 2008, Andreas Metzler wrote:

> On 2008-05-27 Tim Connors <[EMAIL PROTECTED]> wrote:
> > Package: findutils
> > Version: 4.4.0-2
> > Severity: normal
>
> > Is there any reason why findutils (which is depended on by mlocate and
> > locate) includes updatedb.
>
> Hello,
> It does not, afaict:
> SID)[EMAIL PROTECTED]:~$ dpkg -s findutils  | grep Version
> Version: 4.4.0-2
> (SID)[EMAIL PROTECTED]:~$ man grep
> (SID)[EMAIL PROTECTED]:~$ dpkg -L findutils | grep update || echo not found
> not found

Sorry, by "include", I meant the cron.daily/find script which runs
updatedb unconditionally.

updatedb usually links to one of the specialised updatedb by the
alternatives (in this case, updatedb.mlocate, and in the case of slocate,
updatedb.slocate), so it gets run once there.

Then in each of those cronjobs, it also gets run, but with the specialised
options availble in each of those cronjobs (such as mlocate, which runs
updatedb under ionice).

Now (vanilla) locate has its own cronjob (/etc/cron.daily/locate), so
there's absolutely no need for a /etc/cron.daily/find as well, which will
*always* end up running updatedb a second time for whichever version of
locate has been installed in the /etc/alternatives.

> > (which links to mlocate's updatedb via
> > /etc/alternatives), and locate includes its version of updatedb (as
> > expected, but I'll be turning it off), and mlocate includes its own
> > version of updatedb?  This means that mlocate's (or whoever owns the
> > updatedb alternatives) updatedb runs twice, if I traced the shell
> > scripts correctly.
>
> locate's cron job /etc/cron.daily/locate will only run once, I do not
> know how mlocate handles this, but I would be surprised if it ran
> twice.

Yes, /etc/cron.daily/locate runs updatedb once per day, and then
/etc/cron.daily/find runs updatedb once per day.

If both findutils and locate are installed, and none of the other locates
are installed, then this updatedb will point to the same version of
updatedb, and thus findutil's cron.daily job is redundant:

> dpkg -L findutils | grep cron.daily
/etc/cron.daily/find
> dpkg -L locate | grep cron.daily
/etc/cron.daily
/etc/cron.daily/locate

> > To me it seems that all of those packages should include their own
> > updatedb in cron.daily, but findutils should include no such
> > cron.daily job.
>
> If you install both locate and mlocate both cronjobs will run (each
> once) and you will have working databases for both locate
> implementations.

and findutils will run a second copy of updatedb for that package which
ends up getting installed in /etc/alternatives.

-- 
TimC
You can't tuna fish, but you can put tuna on a piano.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to