summaryrefslogtreecommitdiff
path: root/guix/scripts/graph.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/graph.scm')
-rw-r--r--guix/scripts/graph.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index dcc4701779..b0d7c08582 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -19,6 +19,7 @@
(define-module (guix scripts graph)
#:use-module (guix ui)
#:use-module (guix graph)
+ #:use-module (guix grafts)
#:use-module (guix scripts)
#:use-module (guix utils)
#:use-module (guix packages)
@@ -340,8 +341,12 @@ Emit a Graphviz (dot) representation of the dependencies of PACKAGE...\n"))
(define (guix-graph . args)
(with-error-handling
- (let* ((opts (parse-command-line args %options
- (list %default-options)))
+ (let* ((opts (args-fold* args %options
+ (lambda (opt name arg . rest)
+ (leave (_ "~A: unrecognized option~%") name))
+ (lambda (arg result)
+ (alist-cons 'argument arg result))
+ %default-options))
(type (assoc-ref opts 'node-type))
(packages (filter-map (match-lambda
(('argument . spec)
@@ -352,7 +357,9 @@ Emit a Graphviz (dot) representation of the dependencies of PACKAGE...\n"))
opts)))
(with-store store
(run-with-store store
- (mlet %store-monad ((nodes (mapm %store-monad
+ ;; XXX: Since grafting can trigger unsolicited builds, disable it.
+ (mlet %store-monad ((_ (set-grafting #f))
+ (nodes (mapm %store-monad
(node-type-convert type)
packages)))
(export-graph (concatenate nodes)