Remove the remote-builds option
This is superfluous since you can now just set "builders" to empty, e.g. "--builders ''".
This commit is contained in:
parent
af241ae7d3
commit
25f32625e2
5 changed files with 8 additions and 10 deletions
|
@ -188,9 +188,6 @@ struct LegacyArgs : public MixCommonArgs
|
||||||
mkFlag(0, "readonly-mode", "do not write to the Nix store",
|
mkFlag(0, "readonly-mode", "do not write to the Nix store",
|
||||||
&settings.readOnlyMode);
|
&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",
|
mkFlag(0, "show-trace", "show Nix expression stack trace in evaluation errors",
|
||||||
&settings.showTrace);
|
&settings.showTrace);
|
||||||
|
|
||||||
|
|
|
@ -274,6 +274,10 @@ public:
|
||||||
uint64_t expectedNarSize = 0;
|
uint64_t expectedNarSize = 0;
|
||||||
uint64_t doneNarSize = 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(LocalStore & store);
|
||||||
~Worker();
|
~Worker();
|
||||||
|
|
||||||
|
@ -1622,7 +1626,7 @@ void DerivationGoal::buildDone()
|
||||||
|
|
||||||
HookReply DerivationGoal::tryBuildHook()
|
HookReply DerivationGoal::tryBuildHook()
|
||||||
{
|
{
|
||||||
if (!settings.useBuildHook || !useDerivation) return rpDecline;
|
if (!worker.tryBuildHook || !useDerivation) return rpDecline;
|
||||||
|
|
||||||
if (!worker.hook)
|
if (!worker.hook)
|
||||||
worker.hook = std::make_unique<HookInstance>();
|
worker.hook = std::make_unique<HookInstance>();
|
||||||
|
@ -1662,7 +1666,7 @@ HookReply DerivationGoal::tryBuildHook()
|
||||||
if (reply == "decline")
|
if (reply == "decline")
|
||||||
return rpDecline;
|
return rpDecline;
|
||||||
else if (reply == "decline-permanently") {
|
else if (reply == "decline-permanently") {
|
||||||
settings.useBuildHook = false;
|
worker.tryBuildHook = false;
|
||||||
worker.hook = 0;
|
worker.hook = 0;
|
||||||
return rpDecline;
|
return rpDecline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,9 +132,6 @@ public:
|
||||||
"The maximum duration in seconds that a builder can run. "
|
"The maximum duration in seconds that a builder can run. "
|
||||||
"0 means infinity.", {"build-timeout"}};
|
"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",
|
PathSetting buildHook{this, true, nixLibexecDir + "/nix/build-remote", "build-hook",
|
||||||
"The path of the helper program that executes builds to remote machines."};
|
"The path of the helper program that executes builds to remote machines."};
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ void RemoteStore::setOptions(Connection & conn)
|
||||||
<< verbosity
|
<< verbosity
|
||||||
<< settings.maxBuildJobs
|
<< settings.maxBuildJobs
|
||||||
<< settings.maxSilentTime
|
<< settings.maxSilentTime
|
||||||
<< settings.useBuildHook
|
<< true
|
||||||
<< (settings.verboseBuild ? lvlError : lvlVomit)
|
<< (settings.verboseBuild ? lvlError : lvlVomit)
|
||||||
<< 0 // obsolete log type
|
<< 0 // obsolete log type
|
||||||
<< 0 /* obsolete print build trace */
|
<< 0 /* obsolete print build trace */
|
||||||
|
|
|
@ -509,7 +509,7 @@ static void performOp(TunnelLogger * logger, ref<LocalStore> store,
|
||||||
verbosity = (Verbosity) readInt(from);
|
verbosity = (Verbosity) readInt(from);
|
||||||
settings.maxBuildJobs.assign(readInt(from));
|
settings.maxBuildJobs.assign(readInt(from));
|
||||||
settings.maxSilentTime = readInt(from);
|
settings.maxSilentTime = readInt(from);
|
||||||
settings.useBuildHook = readInt(from) != 0;
|
readInt(from); // obsolete useBuildHook
|
||||||
settings.verboseBuild = lvlError == (Verbosity) readInt(from);
|
settings.verboseBuild = lvlError == (Verbosity) readInt(from);
|
||||||
readInt(from); // obsolete logType
|
readInt(from); // obsolete logType
|
||||||
readInt(from); // obsolete printBuildTrace
|
readInt(from); // obsolete printBuildTrace
|
||||||
|
|
Loading…
Reference in a new issue