On Sat, Jan 07, 2006 at 06:11:56AM +0100, Vincent Lefevre wrote:
> 
> When LOCATE_PATH is not set, slocate can read the default database:
> 
> dixsept:~> slocate bin/browser
> /home/vlefevre/bin/browser
> /home/vlefevre/greux/bin/browser
> 
> But not when it is set:
> 
> dixsept:~> LOCATE_PATH=/users/spaces/vlefevre/private/locate/home.db slocate 
> bin/browser
> slocate: fatal error: Could not obtain information on database file 
> '/var/lib/slocate/slocate.db': Permission denied
> zsh: exit 1     LOCATE_PATH=/users/spaces/vlefevre/private/locate/home.db 
> slocate bin/browser
> 
> Moreover, the -d option doesn't work:
> 
> dixsept:~> slocate -d /users/spaces/vlefevre/private/locate/home.db 
> bin/browser
> dixsept:~>

This is odd. On my system I setup a test environment. The default db
'/var/lib/slocate/slocate.db' only has the following entries:

/root/db
/root/db/in_main_db

I also made an alternative db '/tmp/alt.db' which has the following entries:

/root/db
/root/db/in_alt_db

Without LOCATE_PATH set, I get this:

trakker:~/db# echo $LOCATE_PATH
trakker:~/db# slocate in_main
/root/db/in_main_db

With LOCATE_PATH set, I get this:

trakker:~/db# echo $LOCATE_PATH
/tmp/alt.db
trakker:~/db# slocate in_main
/root/db/in_main_db
trakker:~/db# slocate in_alt
/root/db/in_alt_db

-d seems to be working here:

trakker:~/db# slocate -d /tmp/alt.db in_alt
/root/db/in_alt_db
trakker:~/db# slocate -d /tmp/alt.db in_main
trakker:~/db#

Can you provide any futher debugging info?

Thanks,

Kevin-

--
Kevin Lindsay <[EMAIL PROTECTED]>
PGP Key Id:   746C51F4

Attachment: signature.asc
Description: Digital signature

Reply via email to