[Bug 382330] Re: mlocate can't search from database file for unmounted drive
Dave Duback
382330 at bugs.launchpad.net
Thu Jul 4 18:40:26 UTC 2013
Yes, I have confirmed this, for Ubuntu 13.04 and mlocate 0.25.
I found that the PRUNEPATHS variable in /etc/updatedb.conf includes
/media. For me, the default mount point for a USB device with a label
(hard drive OR stick) is /media/dave/{disk label} with me as user dave.
I removed '/media' from PRUNEPATHS in /etc/updatedb.conf and now get the
proper results when searching databases for devices not currently
mounted.
The trick here will be making sure a device is not mounted to /media at
the time the cron job for updatedb runs, or find a way to run mlocate
without a check for the current existence of a path before reporting a
result. In the source for mlocate version 0.25, the implication is that
-e (check for existence) defaults to FALSE but this was not EXPLICIT in
the declaration.
The PRUNEPATHS variable is stored in the header of a .db file. The
anamoly seems to be if you specify /media/user/usbdrive as the root for
updatedb (updatedb -U /media/user/usbdrive), and /media is in PRUNEPATHS
at that time, the database is generated correctly (all files
catalogged), but subsequent searches fail if /media is in
/etc/updatedb.conf.
Again, when I removed '/media' from PRUNEPATHS in /etc/updatedb.conf, my
existing set of nineteen databases scanned from mount points
/media/dave/{disk label} is properly scanned.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mlocate in Ubuntu.
https://bugs.launchpad.net/bugs/382330
Title:
mlocate can't search from database file for unmounted drive
Status in “mlocate” package in Ubuntu:
Confirmed
Bug description:
Binary package hint: mlocate
I built a database file using updatedb. I then unmounted the drive and tried to search that file using the command
sudo locate -d extwd -i *.mp3
This yielded no results. By chance I tried the exact same command
later and it worked because the drive was mounted. It appears as
though the -e option were being implemented.
Please see this thread for reference:
http://ubuntuforums.org/showthread.php?t=1174996
I'm using Ubuntu 64-bit 9.04.
version of mlocate: 0.21.1
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mlocate/+bug/382330/+subscriptions
More information about the foundations-bugs
mailing list