Bug in slocate/updatedb

This is a bug report, for want of a better place to put it.

There's a random bug in "updatedb" which causes it to stop immediately
without an error message and creating an 1-byte long database.

However, if you run "slocate -u", it works fine.

"updatedb" is supposed to be the same as "slocate -u", but if you read
the source code, you'll find that they are a little different in

I didn't have time to track down the bug, but no doubt it is due to
the poor coding of the programmers who wrote it. There's lots of
malloc's around all over the palce, and pointers pointing to who knows

The workaround is to remove /usr/bin/updatedb (which is a link to
slocate), and replace it with this shell script:


# slocate -u works, updatedb doesn't sometimes.
# I've debugged the program and just found that it is buggy.
# This is an easy workaround.
slocate -u "$@"