diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 11:00:16 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 11:00:16 +0200 |
commit | 25f32625e2f2a3a1e1b3a3811da82f21c3a3b880 (patch) | |
tree | 7538d1574f2a3fe30a68ff278975a271fd75c755 | |
parent | af241ae7d3d2a9975d43c9137806a6ffcb96e95b (diff) |
Remove the remote-builds option
This is superfluous since you can now just set "builders" to empty,
e.g. "--builders ''".
-rw-r--r-- | src/libmain/shared.cc | 3 | ||||
-rw-r--r-- | src/libstore/build.cc | 8 | ||||
-rw-r--r-- | src/libstore/globals.hh | 3 | ||||
-rw-r--r-- | src/libstore/remote-store.cc | 2 | ||||
-rw-r--r-- | src/nix-daemon/nix-daemon.cc | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 6393d80bb..aef5d88bf 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -188,9 +188,6 @@ struct LegacyArgs : public MixCommonArgs mkFlag(0, "readonly-mode", "do not write to the Nix store", &settings.readOnlyMode); - mkFlag(0, "no-build-hook", "disable use of the build hook mechanism", - &(bool&) settings.useBuildHook, false); - mkFlag(0, "show-trace", "show Nix expression stack trace in evaluation errors", &settings.showTrace); diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 057ad2bdf..fc800f430 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -274,6 +274,10 @@ public: uint64_t expectedNarSize = 0; uint64_t doneNarSize = 0; + /* Whether to ask the build hook if it can build a derivation. If + it answers with "decline-permanently", we don't try again. */ + bool tryBuildHook = true; + Worker(LocalStore & store); ~Worker(); @@ -1622,7 +1626,7 @@ void DerivationGoal::buildDone() HookReply DerivationGoal::tryBuildHook() { - if (!settings.useBuildHook || !useDerivation) return rpDecline; + if (!worker.tryBuildHook || !useDerivation) return rpDecline; if (!worker.hook) worker.hook = std::make_unique<HookInstance>(); @@ -1662,7 +1666,7 @@ HookReply DerivationGoal::tryBuildHook() if (reply == "decline") return rpDecline; else if (reply == "decline-permanently") { - settings.useBuildHook = false; + worker.tryBuildHook = false; worker.hook = 0; return rpDecline; } diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 4980615dc..880527322 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -132,9 +132,6 @@ public: "The maximum duration in seconds that a builder can run. " "0 means infinity.", {"build-timeout"}}; - Setting<bool> useBuildHook{this, true, "remote-builds", - "Whether to use build hooks (for distributed builds)."}; - PathSetting buildHook{this, true, nixLibexecDir + "/nix/build-remote", "build-hook", "The path of the helper program that executes builds to remote machines."}; diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index b9076c047..77b41b6bf 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -166,7 +166,7 @@ void RemoteStore::setOptions(Connection & conn) << verbosity << settings.maxBuildJobs << settings.maxSilentTime - << settings.useBuildHook + << true << (settings.verboseBuild ? lvlError : lvlVomit) << 0 // obsolete log type << 0 /* obsolete print build trace */ diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc index dbf301a91..5629cc64b 100644 --- a/src/nix-daemon/nix-daemon.cc +++ b/src/nix-daemon/nix-daemon.cc @@ -509,7 +509,7 @@ static void performOp(TunnelLogger * logger, ref<LocalStore> store, verbosity = (Verbosity) readInt(from); settings.maxBuildJobs.assign(readInt(from)); settings.maxSilentTime = readInt(from); - settings.useBuildHook = readInt(from) != 0; + readInt(from); // obsolete useBuildHook settings.verboseBuild = lvlError == (Verbosity) readInt(from); readInt(from); // obsolete logType readInt(from); // obsolete printBuildTrace |