Package: mlocate Version: 0.22.2-1 Severity: wishlist Tags: patch
For the daily updatedb runs I want to use the default '/etc/updatedb.conf' file and add some local options on some servers. I know that I can change the /etc/updatedb.conf file, but that forces me to edit or review the file on each upgrade, but if you add support for a /etc/default/updatedb.mlocate file I can add aditional options on this file and leave the default configuration alone. I'm attaching a patch that adds support for this; note that I used the '/etc/default/updatedb.mlocate' name because that is the name of the binary, but maybe '/etc/default/mlocate' could be a better option. Thanks in advance, Sergio. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-2-amd64 (SMP w/2 CPU cores) Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages mlocate depends on: ii adduser 3.112 add and remove users and groups ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib mlocate recommends no packages. mlocate suggests no packages. -- no debconf information
diff -u mlocate-0.22.2/debian/mlocate.cron.daily mlocate-0.22.2/debian/mlocate.cron.daily --- mlocate-0.22.2/debian/mlocate.cron.daily +++ mlocate-0.22.2/debian/mlocate.cron.daily @@ -30,7 +30,16 @@ +OPTIONS="" +DEFAULTS="/etc/default/updatedb.mlocate" + +if [ -f "$DEFAULTS" ]; then + . "$DEFAULTS" +fi + +## + # See ionice(1) if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then IONICE="/usr/bin/ionice -c3" fi -$IONICE /usr/bin/updatedb.mlocate +$IONICE /usr/bin/updatedb.mlocate $OPTIONS only in patch2: unchanged: --- mlocate-0.22.2.orig/debian/README +++ mlocate-0.22.2/debian/README @@ -0,0 +1,14 @@ +Notes about the mlocate debian package +====================================== + +If you want to change the options of the daily updatedb run you can modify the +'/etc/updatedb.conf', but if you want to keep the default values you can also +generate an '/etc/default/updatedb.mlocate' file that declares an OPTIONS +variable that is used on the 'updatedb' invocation. + +If you want to keep the standard PRUNEPATHS and also ignore the '/export' +directory you can use this '/etc/default/updatedb.mlocate' file: + + OPTIONS="--add-prunepaths /export" + +For a complete list of options see updatedb(8).