aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-12-07 22:06:22 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-12-07 22:06:22 +0100
commit21206caf13fd4e14b5e12b5f7346a8b762234188 (patch)
tree746527c63cfe6aca447fb3fabac45c12128a2978 /src
parent853ef1304c379f03ef33f40bc68225d528cc6105 (diff)
parentfa58bff1ab9aacffd50f8200d72843af7abd827f (diff)
Merge remote-tracking branch 'origin/5712-ca-drvs-with-old-daemon'
Diffstat (limited to 'src')
-rw-r--r--src/libstore/remote-store.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index a627e9cf1..c3d23affb 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -684,6 +684,14 @@ void RemoteStore::queryRealisationUncached(const DrvOutput & id,
Callback<std::shared_ptr<const Realisation>> callback) noexcept
{
auto conn(getConnection());
+
+ if (GET_PROTOCOL_MINOR(conn->daemonVersion) < 27) {
+ warn("The daemon is too old for content-addressed derivations. I’ll do what I can");
+ try {
+ callback(nullptr);
+ } catch (...) { return callback.rethrow(); }
+ }
+
conn->to << wopQueryRealisation;
conn->to << id.to_string();
conn.processStderr();