On Oct 11, 2007, at 05:40, David Epstein wrote:

My first command: slocate slocate
slocate: fatal error: Could not find user database
'/opt/local/var/db/slocate/slocate.db':  No such file or directory

My second command: which slocate
/opt/local/bin/slocate

My third command: sudo /opt/local/etc/daily.slocate
Rebuilding slocate database:
slocate: fatal error: load_file: Could not open file:
/opt/local/etc/updatedb.conf: No such file or directory

I get that message too... but the script does not exit, and it does build the slocate.db. Takes several minutes. Then slocate works fine. Guess the error wasn't fatal after all. You or the maintainer (whom I'm Cc'ing) could report that misleading message to the developers of slocate.

There's more weirdness going on. daily.slocate includes this:

    if [ -f /opt/local/etc/updatedb.conf ]; then
                # One day, I'll look at the bug that requires doing cd / when 
launched
                # with periodic.
                (cd / && /opt/local/bin/slocate -u -c)
        else
                (cd / && /opt/local/bin/slocate -u)
        fi

So, if the conf file exists, it uses the -c option. Otherwise it doesn't. Since, for you, the conf file doesn't exist, it should have used the version without the -c option. Why, then, is slocate still trying to read the conf file?

I tried to avoid the message by creating an empty conf file:

sudo touch /opt/local/etc/updatedb.conf

But now I get:

slocate: option requires an argument -- c

But the manpage does not show that -c requires or even supports an argument:

-c Parse '/opt/local/etc/updatedb.conf' when updating the slocate
              database. (see CONFIGURATION FILE below).

Sounds like there are plenty of bugs here that should be reported upstream.

Can anyone help me get slocate going? Where is updatedb.conf supposed to
come from, and why wasn't it installed when I installed slocate?

The maintainer could comment on why a conf file was not installed with the port by default, but I'd guess it's optional.


_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to