Your message dated Wed, 12 Jun 2013 15:05:23 +0200
with message-id <[email protected]>
and subject line Re: Bug#573284: mlocate: Use an /etc/default file to pass 
options to updatedb on the cron.daily script
has caused the Debian Bug report #573284,
regarding mlocate: Use an /etc/default file to pass options to updatedb on the 
cron.daily script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
573284: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573284
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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).

--- End Message ---
--- Begin Message ---
]] Sergio Talens-Oliag 

> 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 not going to do this, just edit the mlocate.conf file.  You'll only
be prompted on upgrades where the file has changed, just like you would
be prompted on upgrades with a default file.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

--- End Message ---

Reply via email to