aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-19 23:24:50 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-21 01:35:14 +0200
commit3cabdead6fbe080d9466bb3130a2b36dd4b07090 (patch)
treec392aa4dde78b42f7c31675ae139b87a83af173e
parent3c9a7185e4ee81295838bb31f0d437da64dbd390 (diff)
downloadguix-3cabdead6fbe080d9466bb3130a2b36dd4b07090.tar
guix-3cabdead6fbe080d9466bb3130a2b36dd4b07090.tar.gz
graph: Use absolute file name canonicalization.
* guix/scripts/graph.scm (guix-graph): Wrap in 'with-fluids'.
-rw-r--r--guix/scripts/graph.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index ba63780e2b..1623421196 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -356,15 +356,18 @@ Emit a Graphviz (dot) representation of the dependencies of PACKAGE...\n"))
(_ #f))
opts)))
(with-store store
- (run-with-store store
- ;; 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)
- (current-output-port)
- #:node-type type))))))
+ ;; Ask for absolute file names so that .drv file names passed from the
+ ;; user to 'read-derivation' are absolute when it returns.
+ (with-fluids ((%file-port-name-canonicalization 'absolute))
+ (run-with-store store
+ ;; 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)
+ (current-output-port)
+ #:node-type type)))))))
#t)
;;; graph.scm ends here