summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 54ed31cbbc..e92e159ff4 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -734,8 +734,13 @@ is raised if the set of paths read from PORT is not signed (as per
(define* (export-paths server paths port #:key (sign? #t))
"Export the store paths listed in PATHS to PORT, in topological order,
signing them if SIGN? is true."
+ (define ordered
+ ;; Sort PATHS, but don't include their references.
+ (filter (cut member <> paths)
+ (topologically-sorted server paths)))
+
(let ((s (nix-server-socket server)))
- (let loop ((paths (topologically-sorted server paths)))
+ (let loop ((paths ordered))
(match paths
(()
(write-int 0 port))