Summary: | No /etc/updatedb.conf file causes error message when /etc/cron.daily/slocate runs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Varner (RETIRED) <fuzzyray> |
Component: | [OLD] Core system | Assignee: | SpanKY <vapier> |
Status: | RESOLVED UPSTREAM | ||
Severity: | trivial | CC: | fuzzyray, mr_bones_ |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | /etc/cron.daily/slocate patch |
Description
Paul Varner (RETIRED)
2003-12-04 13:21:37 UTC
Created attachment 21708 [details, diff]
/etc/cron.daily/slocate patch
From the updatedb man page: updatedb is simply a link to slocate that implies the -u option. OPTIONS -u Create slocate database starting at the root directory. This is the default behavior when called as updatedb. So... how does your patch make a difference in the behavior? That seems odd. Also, there should be a default /etc/updatedb.conf file installed by the ebuild. What happened to it on your system? Actually updatedb implies "slocate -u -c", from the README file in /usr/share/doc/slocate-2.7-r2 "If you symlinked /usr/local/bin/slocate to /usr/local/bin/updatedb, then executing the updatedb command will automatically index the root filesystem starting at '/'. This will also cause the file '/etc/updatedb.conf' to be parsed. This file is in the same format as the original updatedb.sh configuration file." My updatedb.conf file is still in place, A user on the gentoo-user mailing list wanted to know how to add "/home/*/.Maildir" to the paths to be pruned. Since I had done something similar a long time ago with the findutils version of locate, I was trying to see how to do it with slocate. In the process, I moved /etc/updatedb.conf to /etc/updatedb.conf.orig while testing behavior. That is when I discovered that the updatedb command tries to always parse /etc/updatedb.conf Here is the behavior when run on my machine: garion root # ls -l /etc/updatedb.conf ls: /etc/updatedb.conf: No such file or directory garion root # updatedb warning: updatedb: could not access /etc/updatedb.conf: open: No such file or directory garion root # slocate -u garion root # slocate -u -c warning: slocate: could not access /etc/updatedb.conf: open: No such file or directory garion root # mv /etc/updatedb.conf.orig /etc/updatedb.conf garion root # ls -l /etc/updatedb.conf -rw-r--r-- 1 root root 586 Dec 4 13:47 /etc/updatedb.conf garion root # cat /etc/updatedb.conf # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/sys-apps/slocate/files/updatedb.conf,v 1.4 2003/04/18 02:42:14 lostlogic Exp $ # This file sets environment variables which are used by updatedb # filesystems which are pruned from updatedb database PRUNEFS="NFS nfs afs proc smbfs autofs auto iso9660 devfs tmpfs ncpfs" export PRUNEFS # paths which are pruned from updatedb database PRUNEPATHS="/tmp /var/tmp" export PRUNEPATHS # netpaths which are added NETPATHS="" export NETPATHS garion root # slocate -u; locate /proc/cpu /proc/cpuinfo garion root # slocate -u -c; locate /proc/cpu garion root # -u is implied only if slocate is called as 'updatedb' if you call it as 'slocate' you need to include -u i'll do up the patch if no one else cares This looks like a bug in slocate to me. The man page should say that it will always look at /etc/updatedb.conf if called as updatedb because that's what the code does. upstream probably needs to be made aware of this little inconsistency in the documentation and behavior. The patch looks good to me. go for it, spanky ok, i e-mailed the upstream author about this ... hopefully it should be fixed in future release thanks for the catch mr bones |