Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#4490 - replace slocate with mlocate?

Attached to Project: Arch Linux
Opened by name withheld (Gullible Jones) - Friday, 21 April 2006, 13:55 GMT
Last edited by James Rayner (iphitus) - Monday, 05 November 2007, 12:42 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Aaron Griffin (phrakture)
James Rayner (iphitus)
Architecture All
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Mlocate is ridiculously faster than slocate, and I've yet to find any nasty bugs in it... I think that it would be a good idea to switch it and slocate around - mlocate as default in Current, slocate in Extra.
This task depends upon

Closed by  James Rayner (iphitus)
Monday, 05 November 2007, 12:42 GMT
Reason for closing:  Implemented
Additional comments about closing:  And so that ends the midnight crawl...

Funny killing off a 'feature' that's been there since I started with linux.
Comment by Kurt Basil Cox (basilburn) - Tuesday, 08 August 2006, 14:51 GMT
Just looking at the filelist.

Shouldn't mlocate install to /var/lib/mlocate instead of /usr/var/mlocate?
Comment by name withheld (Gullible Jones) - Tuesday, 08 August 2006, 22:08 GMT
Please file that in a separate bug report, thanks.
Comment by Kurt Basil Cox (basilburn) - Tuesday, 22 August 2006, 23:18 GMT
Sorry, I was just thinking that the devs could kill 2 birds with one stone.


./configure --prefix=/usr --localstatedir=/var/lib/

as the configure line and then replacing all instances of /usr/var with /var/lib in both the PKGBUILD and the mlocate.install file is the only thing that would need to be done.

Please note the attached patch.
Comment by Roman Kyrylych (Romashka) - Saturday, 14 April 2007, 10:40 GMT
Kurt, this is fixed already.
Comment by Börje Holmberg (linfan) - Saturday, 14 April 2007, 16:19 GMT
mlocate does not work. It removes slocate, then tells me to run updatedb. Updatedb complains updatedb: can not find group `mlocate'

Then i reinstall slocate and now it says: updatedb: warning: Could not find the group: slocate in the /etc/group file.
updatedb: fatal error: This is a result of the group missing or a corrupted group file.

Ok, after some trickery I deleted the locate in /etc/group and the /etc/updatedb.conf* and reinstalled slocate and then at least slocate works.

Something is fishy.

Comment by Roman Kyrylych (Romashka) - Saturday, 14 April 2007, 16:33 GMT
Börje, see and make sure you the latest package.
Comment by Börje Holmberg (linfan) - Saturday, 14 April 2007, 19:06 GMT
Still same error

# pacman -Sy mlocate
:: Synchronizing package databases...
testing is up to date
current is up to date
extra is up to date
unstable is up to date
community is up to date
resolving dependencies... done.
looking for inter-conflicts...
:: mlocate conflicts with slocate. Remove slocate? [Y/n] y

Remove: slocate

Targets: mlocate-0.16-2

Total Package Size: 0.10 MB

Proceed with installation? [Y/n]
checking package integrity... done.
warning: /etc/updatedb.conf saved as /etc/updatedb.conf.pacsave
cleaning up... done.
(1/1) checking for file conflicts [---------------------] 100%
(1/1) installing mlocate [---------------------] 100%
mlocate command is technically locate, but slocate is symlinked and still works.
You should run updatedb as root.
[root@sawernew borje4]# updatedb
updatedb: can not find group `mlocate'
[root@sawernew borje4]#

Comment by James Rayner (iphitus) - Sunday, 15 April 2007, 10:03 GMT
try mlocate -3

Sorry about the -2 mess up, i dont know how i stuffed that up... -3 works here though.

Comment by Aaron Griffin (phrakture) - Tuesday, 09 October 2007, 15:32 GMT
Why was this reopened?
We have slocate in core and mlocate in extra, what else is the pertaining to this bug?

EDIT: Ah ignore me - the request is to swap the two around.

Hmmm - what's the technical difference here? Can someone provide pros/cons for me to evaluate besides "it's just way faster" ?
Comment by name withheld (Gullible Jones) - Tuesday, 09 October 2007, 18:43 GMT
Slocate rebuilds the database on every updated, whereas mlocate ("merging locate") looks for changes and merges them with the old database. Otherwise they're the same.
Comment by Travis Willard (Cerebral) - Tuesday, 09 October 2007, 18:55 GMT
Yeah, the difference is pretty much in the speed of updatedb, not necessarily the speed of 'locate' itself. I've been using mlocate for a looong time (IIRC I used to maintain it in community when I was a TU, before James stole it away from me for the "uber official repos"), and haven't had any issues with it.
Comment by eliott (cactus) - Tuesday, 09 October 2007, 18:56 GMT
I am all for making mlocate the default.
The first run of updatedb seems to take a bit longer with mlocate than slocate, but subsequent runs are *much* faster.
Comment by Dan McGee (toofishes) - Tuesday, 09 October 2007, 19:06 GMT
+1 to switch to mlocate. Much less hard drive thrashing at 12:03 AM. My only complaint- slocate has mlocates -e (--existing) option on by default, which I suppose could be easily aliased but it makes so much more sense to only print out files that actually exist. Why mlocate defaults to the other behavior seems odd to me.

On a somewhat related note, why the hell do slocate and mlocate make two different groups with different names? Shouldn't they both use the 'locate' group that we should standardize on? Just my two cents.
Comment by Scott H (stonecrest) - Tuesday, 09 October 2007, 19:21 GMT
I'm in favor of mlocate as well. Nnot only is mlocate faster than slocate, but it doesn't take over your cpu when it runs.

mlocate is used by default in red hat, maybe others too?
Comment by Roman Kyrylych (Romashka) - Friday, 02 November 2007, 16:26 GMT
Comment by Aaron Griffin (phrakture) - Friday, 02 November 2007, 16:45 GMT
$ pacman -Si slocate
Repository : core

$ pacman -Si mlocate
Repository : extra

So... status == "the same" || "not done yet"
Comment by James Rayner (iphitus) - Saturday, 03 November 2007, 07:31 GMT
Done. Moved to core, set the replaces, and put into testing. Supposing I did everything right and there's no problems, in a little while I'll take it outta testing, remove it from [extra] and we'll all have mlocate instead.

Cerebral: You could always steal it back now if you really want the revenge^H^H^H^H^H^H^H^Hpackage. :P

Comment by eliott (cactus) - Saturday, 03 November 2007, 08:05 GMT