civodul pushed a commit to branch master
in repository guix.
commit c9ac6c87154558b2f91cfa8ecc2237c4d390786e
Author: Yelninei <[email protected]>
AuthorDate: Sun Apr 13 09:08:39 2025 +0000
locate: Request writable db for --clear.
Fixes <https://issues.guix.gnu.org/76141>.
* guix/scripts/locate.scm (guix-locate): Use writable db when --clear is
given.
Change-Id: I2e4e945cef022b08dd6af4c252e67c2a4d5bf38c
Signed-off-by: Ludovic Courtès <[email protected]>
---
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 f8ee875c7c..b42011f8c4 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)