diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-02-10 23:30:09 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-02-10 23:36:42 +0100 |
commit | 99fbddf9a623757e39d88bfb431f8f7d6f24b75b (patch) | |
tree | 7617873f6bcbb9d326ccd4263b4e893c95680a2e /guix | |
parent | 829b1b253e96b4e26b6d8dd5a128dc0a53a30e96 (diff) |
store: Change 'export-paths' to always export in topological order.
* guix/store.scm (export-paths): Pass PATHS through
'topologically-sorted' before iterating.
* tests/store.scm ("export/import paths, ensure topological order"): New
test.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/store.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/store.scm b/guix/store.scm index eca0de7d97..b9b9d9e55a 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -732,10 +732,10 @@ is raised if the set of paths read from PORT is not signed (as per (= 1 (read-int s)))) (define* (export-paths server paths port #:key (sign? #t)) - "Export the store paths listed in PATHS to PORT, signing them if SIGN? -is true." + "Export the store paths listed in PATHS to PORT, in topological order, +signing them if SIGN? is true." (let ((s (nix-server-socket server))) - (let loop ((paths paths)) + (let loop ((paths (topologically-sorted server paths))) (match paths (() (write-int 0 port)) |