about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-14T10·19+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-14T10·19+0200
commitfa13d3f4f3d8fb6dc3e3fc87ac5a2e26d8b32d84 (patch)
tree6f18ceb94403c242d3c8174663d135c5ba8a4251 /src/nix-store/nix-store.cc
parentb2e0293f022123b11759dfd498d4eff72233d3f7 (diff)
build-remote.pl: Fix building multiple output derivations
We were importing paths without sorting them topologically, leading to
"path is not valid" errors.

See e.g. http://hydra.nixos.org/build/12451761
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 0196c2fc1873..048f5c603008 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -992,7 +992,9 @@ static void opServe(Strings opFlags, Strings opArgs)
             }
 
             case cmdExportPaths: {
-                exportPaths(*store, readStorePaths<Paths>(in), false, out);
+                Paths sorted = topoSortPaths(*store, readStorePaths<PathSet>(in));
+                reverse(sorted.begin(), sorted.end());
+                exportPaths(*store, sorted, false, out);
                 break;
             }