[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
55/376: build-remote.pl: Fix building multiple output derivations
From: |
Ludovic Courtès |
Subject: |
55/376: build-remote.pl: Fix building multiple output derivations |
Date: |
Wed, 28 Jan 2015 22:04:00 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit fa13d3f4f3d8fb6dc3e3fc87ac5a2e26d8b32d84
Author: Eelco Dolstra <address@hidden>
Date: Mon Jul 14 12:19:27 2014 +0200
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
---
src/libstore/remote-store.cc | 1 -
src/nix-store/nix-store.cc | 4 +++-
tests/remote-builds.nix | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index f566ccf..3b021bb 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -35,7 +35,6 @@ template<class T> T readStorePaths(Source & from)
}
template PathSet readStorePaths(Source & from);
-template Paths readStorePaths(Source & from);
RemoteStore::RemoteStore()
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 0196c2f..048f5c6 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;
}
diff --git a/tests/remote-builds.nix b/tests/remote-builds.nix
index 571cdfb..eb80a7d 100644
--- a/tests/remote-builds.nix
+++ b/tests/remote-builds.nix
@@ -25,7 +25,8 @@ let
system = "i686-linux";
PATH = "''${utils}/bin";
builder = "''${utils}/bin/sh";
- args = [ "-c" "echo Hello; mkdir $out; cat /proc/sys/kernel/hostname >
$out/host; sleep 3" ];
+ args = [ "-c" "echo Hello; mkdir $out $foo; cat
/proc/sys/kernel/hostname > $out/host; ln -s $out $foo/bar; sleep 5" ];
+ outputs = [ "out" "foo" ];
}
'';
@@ -86,7 +87,7 @@ in
# And a parallel build.
my ($out1, $out2) = split /\s/,
- $client->succeed("nix-store -r \$(nix-instantiate ${expr
nodes.client.config 2} ${expr nodes.client.config 3})");
+ $client->succeed('nix-store -r $(nix-instantiate ${expr
nodes.client.config 2})\!out $(nix-instantiate ${expr nodes.client.config
3})\!out');
$slave1->succeed("test -e $out1 -o -e $out2");
$slave2->succeed("test -e $out1 -o -e $out2");
- 39/376: nix-copy-closure: Fix race condition, (continued)
- 39/376: nix-copy-closure: Fix race condition, Ludovic Courtès, 2015/01/28
- 23/376: findFile: Realise the context of the path attributes, Ludovic Courtès, 2015/01/28
- 44/376: nix-copy-closure: Fix --dry-run, Ludovic Courtès, 2015/01/28
- 46/376: Fix use of sysread, Ludovic Courtès, 2015/01/28
- 45/376: nix-copy-closure -s: Do substitutions via ‘nix-store --serve’, Ludovic Courtès, 2015/01/28
- 48/376: Fix broken Pid constructor, Ludovic Courtès, 2015/01/28
- 42/376: Refactoring: Move all fork handling into a higher-order function, Ludovic Courtès, 2015/01/28
- 49/376: Allow $NIX_BUILD_HOOK to be relative to Nix libexec directory, Ludovic Courtès, 2015/01/28
- 52/376: Fix test, Ludovic Courtès, 2015/01/28
- 54/376: build-remote.pl: Don't keep a shell process around, Ludovic Courtès, 2015/01/28
- 55/376: build-remote.pl: Fix building multiple output derivations,
Ludovic Courtès <=
- 47/376: Replace message "importing path <...>" with "exporting path <...>", Ludovic Courtès, 2015/01/28
- 58/376: Pass *_proxy vars to bootstrap fetchurl, Ludovic Courtès, 2015/01/28
- 51/376: build-remote.pl: Use ‘nix-store --serve’ on the remote side, Ludovic Courtès, 2015/01/28
- 50/376: Fix closure size display, Ludovic Courtès, 2015/01/28
- 63/376: Get rid of a compiler warning, Ludovic Courtès, 2015/01/28
- 43/376: Remove tabs, Ludovic Courtès, 2015/01/28
- 64/376: nix-daemon: Fix compat with older clients, Ludovic Courtès, 2015/01/28
- 57/376: Manual: Typo, Ludovic Courtès, 2015/01/28
- 53/376: build-remote.pl: Fix build log, Ludovic Courtès, 2015/01/28
- 61/376: Handle case collisions on case-insensitive systems, Ludovic Courtès, 2015/01/28