#285201 [Fwd: findutils: Updating locatedb less often should be configureable more conveniently.

Package:
locate
Source:
findutils
Description:
maintain and query an index of a directory tree
Submitter:
Andreas Krüger
Date:
2010-09-04 15:54:03 UTC
Severity:
wishlist
#285201#5
Date:
2004-12-11 14:56:26 UTC
From:
To:
I'm one of these folks who use their Debian machine in a home desktop setting.
I only switch it on when I need it.   Also, this is a somewhat outdated, yet
"good enough" Pentium III-type computer. Fast enough for mail and web.  By and
large, my experience running Debian on such a machine has been quite pleasing.

However, I often switch on the computer for nothing but a "quick check for new
email".  Mostly with barely enough time to do it.  Way too often, in this
situation, the locate database update slows things down badly.

I appreciate the advice given in
/usr/share/doc/findutils/README.Debian, on how to have the update
happen less frequently.

I suggest that this should not just be an advice in README.Debian, to be
followed by those of us who know how to find it, and how to edit a
configuration file that's sourced in via ".".

In my opinion, it would be better for some full scale configuration options to
this respect to be available. In many fairly typical settings, it would be
helpful if the following questions were asked upon initial installation of the
software:

* Do you want the update to happen automatically at all?

* If yes, how frequently?

* Do you want to restrict the update runs to certain days of the week?

This last question stems from my own experience: I tend to be much less in a
hurry on weekends.

To restrict updatedb runs to every second weekend, I've just thrown in the
following lines into my machine's /etc/updatedb.conf:

    if [ -s /var/cache/locate/locatedb ]
    then
       # Don't update info that's younger than 10 days:
       [ -n "`find /var/cache/locate -name locatedb -mtime -10`" ] &&
          exit 0

       # Update info only on Saturdays and Sundays:
       perl -we \
          '$wd = (localtime(time))[6]; exit (($wd == 6 || $wd == 0) ? 1 : 0)' &&
          exit 0
    fi

Regards, and thank you for providing fine software.

Andreas Krüger

#285201#10
Date:
2004-12-11 15:45:51 UTC
From:
To:
tags 285201 wontfix
thanks

[...]
[...]

I disagree. Questions should not be asked if there is a sane default.
The primary means of customizing Debian is to edit configuration
files, we have a fully automated way to deal with this in our core
software, dpkg.

debconf is not a universal configuration frontend for Debian, it is
just a way to ask question *if* there is no sane default and questions
need to be asked.
                 cu andreas

#285201#17
Date:
2004-12-11 16:46:14 UTC
From:
To:
Andreas Metzler schrieb:

Yes - but "daily" as a default is not sane.

Regards,

Andreas