From c9ac6c87154558b2f91cfa8ecc2237c4d390786e Mon Sep 17 00:00:00 2001 From: Yelninei Date: Sun, 13 Apr 2025 09:08:39 +0000 Subject: [PATCH] locate: Request writable db for --clear. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * guix/scripts/locate.scm (guix-locate): Use writable db when --clear is given. Change-Id: I2e4e945cef022b08dd6af4c252e67c2a4d5bf38c Signed-off-by: Ludovic Courtès --- guix/scripts/locate.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/scripts/locate.scm b/guix/scripts/locate.scm index f8ee875c7c0..b42011f8c4c 100644 --- a/guix/scripts/locate.scm +++ b/guix/scripts/locate.scm @@ -624,7 +624,8 @@ Locate FILE and return the list of packages that contain it.\n")) (clear? (assoc-ref opts 'clear?)) (update? (assoc-ref opts 'update?)) (glob? (assoc-ref opts 'glob?)) - (database ((assoc-ref opts 'database) update? age-update-threshold)) + (database ((assoc-ref opts 'database) + (or clear? update?) age-update-threshold)) (method (assoc-ref opts 'method)) (files (reverse (filter-map (match-lambda (('argument . arg) arg)