Bug 163340

Summary: PRUNEFS and PRUNEPATHS appear to be environmental variables but aren't.
Product: [Fedora] Fedora Reporter: Jonathan Werrett <jonathan>
Component: slocateAssignee: Miloslav Trmač <mitr>
Status: CLOSED CURRENTRELEASE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-15 19:48:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Werrett 2005-07-15 11:33:04 UTC
Description of problem:

In slocate's /etc/updatedb.conf PRUNEFS and PRUNEPATHS appear to be used
as environmental variables. Eg. they are exported and
/etc/cron.daily/slocate.cron source's the conf file before running updatedb.

However, updatedb ignores the environment and reads the conf file (whose
location is compiled in), looking for the lines that start with PRUNEFS and
PRUNEPATH.

Version-Release number of selected component (if applicable):
slocate-2.7-12

How reproducible:

Have a /etc/updatedb.conf like this:
PRUNEFS="sysfs selinuxfs usbdevfs devpts NFS nfs afs sfs proc smbfs cifs autofs
auto iso9660 udf"
PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /net /sfs /selinux /udev /mnt/floppy"
export PRUNEFS
export PRUNEPATHS
PRUNEPATHS="$PRUNEPATHS /data /data1 /data2 /aerialcache"
  
Actual results:

/usr/bin/updatedb will have an affective PRUNEPATHS of
"/tmp /usr/tmp /var/tmp /afs /net /sfs /selinux /udev /mnt/floppy"

Expected results:

If PRUNEPATHS was being read as an environmental, you'd expect this:
"/tmp /usr/tmp /var/tmp /afs /net /sfs /selinux /udev /mnt/floppy /data /data1
/data2 /aerialcache"

Comment 1 Miloslav Trmač 2005-07-15 19:48:25 UTC
Thanks for your report.

This was fixed in FC4: there are no 'export' lines in /etc/updatedb.conf,
and updatedb.conf(5) documents the file format.
/etc/cron.daily/slocate.cron still sources the file unfortunately.