Toolbox: is mlocate useful for toolbox?

Created on 17 Mar 2020  ·  7Comments  ·  Source: containers/toolbox

I am not sure how well mlocate works in Toolbox.

Recently when I tried it, I ended up with a 340MB database, maybe because of ~/.local/share/containers?

Are people using it or should we drop it from the default fedora-toolbox packages?

Most helpful comment

I am not using it and would be happy if you dropped it.

All 7 comments

I am not using it and would be happy if you dropped it.

Until now I didn't know such tool even existed :)

Until now I didn't know such tool even existed :)

Oh it's useful on Workstation at least.

On Silverblue, locate only shows me entries for /etc and /boot basically... so yeah, but maybe the config could be fixed to index /usr, /home, /var, etc also?

See also https://bugzilla.redhat.com/show_bug.cgi?id=906591

Until now I didn't know such tool even existed :)

Oh it's useful on Workstation at least.

The problem is that we expect many CLI users, such as developers, to live inside a toolbox container. If so, the lack of mlocate can be felt.

Recently when I tried it, I ended up with a 340MB database, maybe because of
~/.local/share/containers?

We also have the problem that the database doesn't get automatically created.

I think we can solve this by having toolbox init-container periodically invoke updatedb with a carefully crafted set of command line arguments that skip things like ~/.local/share/containers in addition to the static configuration in /etc/updatedb.conf.

Note that toolbox init-container is the entry-point process for all Toolbox containers, and is always running for any container that's in use. Currently it invokes sleep +Inf but we can make it do more than that. (Thanks to @HarryMichal for this clever observation!)

I believe for now we can close this since @juhp went ahead and removed the tool from the fedora-toolbox image and considering that there were no reports complaining about the tool being gone.

I was playing with this a bit today.

Recently when I tried it, I ended up with a 340MB database, maybe
because of ~/.local/share/containers?

How do the sizes of /var/lib/mlocate/mlocate.db on the host and inside the container compare?

In my case on a Fedora Workstation system, they were 101M and 100M respectively. Silverblue doesn't have a working mlocate on the host, so the comparison there is less meaningful.

See also https://bugzilla.redhat.com/show_bug.cgi?id=906591

Strangely enough, having PRUNE_BIND_MOUNTS = "yes" doesn't seem to prevent updatedb from indexing all the bind mounts inside a Toolbox container. eg., locate Downloads or locate pam_xauth.so returns results from locations that are known to be bind mounts.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juhp picture juhp  ·  5Comments

cjao picture cjao  ·  10Comments

zapateo picture zapateo  ·  9Comments

FlorianLudwig picture FlorianLudwig  ·  9Comments

Yajo picture Yajo  ·  4Comments