guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19/20: squash! Show output name except for "out"; remove '-d'.


From: guix-commits
Subject: 19/20: squash! Show output name except for "out"; remove '-d'.
Date: Sun, 4 Jun 2023 17:34:42 -0400 (EDT)

civodul pushed a commit to branch wip-guix-index
in repository guix.

commit 3c23c53dd51d7f5c169937b058d540139cec1266
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 4 23:14:56 2023 +0200

    squash! Show output name except for "out"; remove '-d'.
---
 guix/scripts/locate.scm | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/guix/scripts/locate.scm b/guix/scripts/locate.scm
index bc30b5269f..548bd507e0 100644
--- a/guix/scripts/locate.scm
+++ b/guix/scripts/locate.scm
@@ -403,10 +403,7 @@ ON f.basename = :file
   (sqlite-fold (lambda (result lst)
                  (match result
                    (#(package version output directory file)
-                    (cons (package-match package version
-                                         (match output
-                                           ("" "out")
-                                           (_ output))
+                    (cons (package-match package version output
                                          (string-append prefix "/"
                                                         directory "/" file))
                           lst))))
@@ -449,9 +446,9 @@ ON f.basename = :file
                     (file    (package-match-file result)))
                 (format #t "~20a ~a~%"
                         (string-append name "@" version
-                                       (if (string-null? output)
-                                           ""
-                                           (string-append ":" output)))
+                                       (match output
+                                         ("out" "")
+                                         (_ (string-append ":" output))))
                         file)))
             matches))
 
@@ -506,7 +503,7 @@ Locate FILE and return the package(s) that contain it.\n"))
            (lambda (opt name arg result)
              (show-version-and-exit "guix locate")))
    ;; index data out of the method (store or package)
-   (option '(#\d "database") #f #t
+   (option '("database") #f #t
            (lambda (opt name arg result)
              (alist-cons 'database (const arg)
                          (alist-delete 'database result))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]