Bug 49327 - slocate ignores LOCATE _PATH
slocate ignores LOCATE _PATH
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: slocate (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-17 21:39 EDT by Jim Radford
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 14:44:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jim Radford 2001-07-17 21:39:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.6 i686; en-US; rv:0.9.1)
Gecko/20010609

Description of problem:
slocate ignores datbases passed in the LOCATE_PATH environment
variable.


How reproducible:
Always

Steps to Reproduce:
$ mkdir -p /tmp/locate/asdfasdf/time
$ locate -o x -U /tmp/locate
$ env LOCATE_PATH=x locate asdfasdf
$ locate -d x asdfasdf
/tmp/locate/asdfasdf
/tmp/locate/asdfasdf/time


Additional info:

Here's a patch.

--- slocate-2.5/main.c.orig     Tue Jul 17 18:15:10 2001
+++ slocate-2.5/main.c  Tue Jul 17 18:16:33 2001
@@ -1362,6 +1362,10 @@
        /* Add the LOCATE_PATH environment variable to the list of
databases to search in */
        parse_decode_path(getenv("LOCATE_PATH"));
 
+       /* If we found something in LOCATE_PATH then don't overwrite it
with the default */
+       if(SLOCATE_PATH && *SLOCATE_PATH) 
+           ADD_SLOCATEDB=0;
+
        /* Loop through specified command line arguments */
        while ((ch = getopt(args,argv,"VvuhqU:r:o:e:l:d:-:n:f:ci")) != EOF) {
                switch(ch) {
Comment 1 Thomas Woerner 2004-10-15 14:44:45 EDT
Please verify this with a newer version of Red Hat Enterprise Linux or
Fedora Core and reopen it against the new version if it still occurs.

Closing as "not a bug" for now.

Note You need to log in before you can comment on or make changes to this bug.