civodul pushed a commit to branch wip-guix-index
in repository guix.
commit a20d28489d939923537399c84007877784bdf251
Author: Ludovic Courtès <[email protected]>
AuthorDate: Sun Apr 2 23:07:57 2023 +0200
squash! "with-method" -> "method"
---
guix/scripts/index.scm | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/guix/scripts/index.scm b/guix/scripts/index.scm
index 0b4746d6c4..108c98dbed 100644
--- a/guix/scripts/index.scm
+++ b/guix/scripts/index.scm
@@ -492,14 +492,14 @@ See --database for customization.\n"))
(format #t "%options: --method: result ~a\n" result))
(match arg
((or "manifests" "store")
- (alist-cons 'with-method arg
- (alist-delete 'with-method result)))
+ (alist-cons 'method (string->symbol arg)
+ (alist-delete 'method result)))
(_
(leave (G_ "~a: unknown indexing method~%"))))))))
(define %default-options
`((database . ,user-database-file)
- (with-method . "manifests")))
+ (method . manifests)))
(define-command (guix-index . args)
(category packaging)
@@ -548,21 +548,21 @@ See --database for customization.\n"))
(alist-delete 'action opts))))))
(with-error-handling
- (let* ((opts (parse-command-line args %options
- (list %default-options)
- #:build-options? #f ;no builds
- #:argument-handler
- parse-sub-command))
- (args (option-arguments opts))
- (action (assoc-ref args 'action))
- (database (assoc-ref args 'database))
- (with-method (assoc-ref args 'with-method)))
+ (let* ((opts (parse-command-line args %options
+ (list %default-options)
+ #:build-options? #f ;no builds
+ #:argument-handler
+ parse-sub-command))
+ (args (option-arguments opts))
+ (action (assoc-ref args 'action))
+ (database (assoc-ref args 'database))
+ (method (assoc-ref args 'method)))
(when debug
(format #t "main: opts: ~a\n" opts)
(format #t "main: args: ~a\n" args)
(format #t "main: action: ~a\n" action)
(format #t "main: database: ~a\n" database)
- (format #t "main: with-method: ~a\n" with-method))
+ (format #t "main: method: ~a\n" method))
(match action
('search
@@ -583,6 +583,6 @@ will browse available packages on your system, which may
take time."))
;; Migrate/initialize db to schema at version application-version
(migrate-schema-to-version database)
;; Finally index packages
- (if (string=? with-method "manifests")
+ (if (eq? method 'manifests)
(index-packages-from-manifests-with-db database)
(index-packages-from-store-with-db database)))))))