[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
55/118: build-remote.pl: Fix building multiple output derivations
From: |
Ludovic Courtès |
Subject: |
55/118: build-remote.pl: Fix building multiple output derivations |
Date: |
Tue, 19 May 2015 14:45:38 +0000 |
civodul pushed a commit to branch nix
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");
- 57/118: Manual: Typo, (continued)
- 57/118: Manual: Typo, Ludovic Courtès, 2015/05/19
- 53/118: build-remote.pl: Fix build log, Ludovic Courtès, 2015/05/19
- 66/118: nix-daemon: Show name of connecting user, Ludovic Courtès, 2015/05/19
- 58/118: Pass *_proxy vars to bootstrap fetchurl, Ludovic Courtès, 2015/05/19
- 56/118: Remove cruft, Ludovic Courtès, 2015/05/19
- 48/118: Fix broken Pid constructor, Ludovic Courtès, 2015/05/19
- 51/118: build-remote.pl: Use ‘nix-store --serve’ on the remote side, Ludovic Courtès, 2015/05/19
- 62/118: Be more strict about file names in NARs, Ludovic Courtès, 2015/05/19
- 65/118: nix-daemon: Only print connection info if we have SO_PEERCRED, Ludovic Courtès, 2015/05/19
- 72/118: Remove dead code, Ludovic Courtès, 2015/05/19
- 55/118: build-remote.pl: Fix building multiple output derivations,
Ludovic Courtès <=
- 59/118: Install systemd and Upstart stuff only on Linux, Ludovic Courtès, 2015/05/19
- 68/118: Ugly hack to fix building on old Darwin, Ludovic Courtès, 2015/05/19
- 64/118: nix-daemon: Fix compat with older clients, Ludovic Courtès, 2015/05/19
- 61/118: Handle case collisions on case-insensitive systems, Ludovic Courtès, 2015/05/19
- 60/118: Make dev-shell script work on Darwin, Ludovic Courtès, 2015/05/19
- 71/118: Revert old useBuildHook behaviour, Ludovic Courtès, 2015/05/19
- 63/118: Get rid of a compiler warning, Ludovic Courtès, 2015/05/19
- 67/118: nix-daemon: Add trusted-users and allowed-users options, Ludovic Courtès, 2015/05/19
- 70/118: Better fix for strcasecmp on Darwin, Ludovic Courtès, 2015/05/19
- 75/118: Merge commit 'fdee1ced43fb495d612a29e955141cdf6b9a95ba' into nix, Ludovic Courtès, 2015/05/19