aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-10-01 16:35:02 +0200
committerGitHub <noreply@github.com>2021-10-01 16:35:02 +0200
commit7cc220825daa29cfeea8592e1396e9d72082b0f4 (patch)
treeb6228a0422ea678de66ccec34c08437d8ef49515 /src
parent9e39314593a76044d7e8715a961b56b19aed5c82 (diff)
parent50edbc4ddf1f32fbf30ecaa7222beadf10947f5e (diff)
Merge pull request #5167 from Ma27/keep-failed-on-ssh-remote-build
nix-store --serve: pass on `settings.keepFailed` from SSH store
Diffstat (limited to 'src')
-rw-r--r--src/libstore/legacy-ssh-store.cc4
-rw-r--r--src/libstore/serve-protocol.hh2
-rw-r--r--src/nix-store/nix-store.cc3
3 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index 7ae4e7c24..814960bb5 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -248,6 +248,10 @@ private:
conn.to
<< settings.buildRepeat
<< settings.enforceDeterminism;
+
+ if (GET_PROTOCOL_MINOR(conn.remoteVersion) >= 7) {
+ conn.to << ((int) settings.keepFailed);
+ }
}
public:
diff --git a/src/libstore/serve-protocol.hh b/src/libstore/serve-protocol.hh
index 02d0810cc..3f76baa82 100644
--- a/src/libstore/serve-protocol.hh
+++ b/src/libstore/serve-protocol.hh
@@ -5,7 +5,7 @@ namespace nix {
#define SERVE_MAGIC_1 0x390c9deb
#define SERVE_MAGIC_2 0x5452eecb
-#define SERVE_PROTOCOL_VERSION (2 << 8 | 6)
+#define SERVE_PROTOCOL_VERSION (2 << 8 | 7)
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index b327793e7..f0ce0368a 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -801,6 +801,9 @@ static void opServe(Strings opFlags, Strings opArgs)
settings.enforceDeterminism = readInt(in);
settings.runDiffHook = true;
}
+ if (GET_PROTOCOL_MINOR(clientVersion) >= 7) {
+ settings.keepFailed = (bool) readInt(in);
+ }
settings.printRepeatedBuilds = false;
};