diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-08-23 23:47:29 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-08-31 13:11:46 +0200 |
commit | 50edbc4ddf1f32fbf30ecaa7222beadf10947f5e (patch) | |
tree | cfe102a89148c7b025469d5f24b358de1685f085 /src/libstore | |
parent | af94b54db3a2be100731a215cb5e95f306471731 (diff) |
nix-store --serve: pass on `settings.keepFailed` from SSH store
When doing e.g.
nix-build -A package --keep-failed --option \
builders \
'ssh://mfhydra?remote-store=/home/bosch/store x86_64-linux - 10 4 big-parallel'
this doesn't work properly because this build-setting is ignored.
I changed this behavior by passing the `settings.keepFailed` through the
serve-protocol to remote machines to make sure that I can introspect the
build-directory (which is particularly helpful when I have to look at a
`config.log` from a failed build for instance).
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/legacy-ssh-store.cc | 4 | ||||
-rw-r--r-- | src/libstore/serve-protocol.hh | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 45eed5707..7da3b36b5 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -237,6 +237,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) |