[Nix-dev] locate utility (and likely find)
Kirill Elagin
kirelagin at gmail.com
Wed Mar 4 08:01:59 CET 2015
On Wed, Mar 4, 2015 at 3:11 AM Tony Su <tonysu at su-networking.com> wrote:
> It looks to me like "locate" is already installed and available in a
> default install (stable).
>
> But, it won't function without an updated database.
> But, running "updatedb" (as root) apparently points to a read-only
> location.
>
And by running as root do you mean `sudo`?
NixOS sets `LOCATE_PATH` environment variable to the correct path of
`locatedb` but `sudo` obviously doesn’t preserve the variable.
First of all, we should consider making `LOCATE_PATH` a session variable.
Next, I believe there is definitely room for improvement. I don’t think
it’s cool that `findutils` are being added to `systemPackages`
unconditionally, so become visible to the user, but the `update-locatedb`
service is installed only when `services.locate` is enabled. This causes
confusion indeed.
Should a default installation be required to set a custom path for the
> findutils database? I was expecting that simply running "updatedb"
> should have executed without problem.
>
> Tony
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150304/320752c9/attachment.html
More information about the nix-dev
mailing list