Ludovic Courtès d0fed2f4df
locate: Do not return the system database when it is too old.
Fixes a bug whereby ‘guix locate’ would pick the system database, then
decide it’s too old, try to update it, and fail because it’s not
writable by unprivileged users.

Fixes <https://issues.guix.gnu.org/66612>.

* guix/scripts/locate.scm (file-age): New procedure.
(suitable-database): Add ‘age-update-threshold’ parameter and honor it.
(guix-locate): Remove ‘file-age’.  Pass ‘age-update-threshold’ to the
‘database’ option.

Reported-by: Matt Wette <matt.wette@gmail.com>
2023-10-18 18:21:04 +02:00
..
2023-10-06 16:37:16 +02:00
2023-08-12 23:02:31 +02:00
2023-03-13 15:08:33 +01:00
2023-09-26 17:36:58 +02:00
2023-03-13 15:08:33 +01:00
2022-11-11 23:17:42 +01:00
2023-08-25 14:24:43 +02:00
2023-03-13 15:08:33 +01:00
2022-12-02 23:20:54 +01:00
2023-03-13 15:08:33 +01:00
2023-02-19 10:09:15 +01:00
2023-03-13 15:08:33 +01:00
2023-03-13 15:08:33 +01:00
2023-09-26 17:36:58 +02:00
2023-03-13 15:08:33 +01:00