Bug 49327 - slocate ignores LOCATE _PATH
Summary: slocate ignores LOCATE _PATH
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: slocate (Show other bugs)
(Show other bugs)
Version: 7.1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-18 01:39 UTC by Jim Radford
Modified: 2007-04-18 16:34 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Jim Radford 2001-07-18 01:39:17 UTC
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 18:44:45 UTC
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.