diff options
author | eldritch horrors <pennae@lix.systems> | 2024-08-02 17:00:57 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-08-08 12:02:17 +0000 |
commit | ba85e501ced59838d36f36cb545bcc6f7bc30561 (patch) | |
tree | a41cd7ead24ba600bb303186cab5527f97cd12f7 /src/libstore/build/local-derivation-goal.cc | |
parent | fc987b412385a3b10d58eabd516acc7ff3b27b11 (diff) |
libstore: make Worker status flags private
Change-Id: I16ec8994c6448d70b686a2e4c10f19d4e240750d
Diffstat (limited to 'src/libstore/build/local-derivation-goal.cc')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 3618aa191..afc741397 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -235,8 +235,9 @@ Goal::WorkResult LocalDerivationGoal::tryLocalBuild() } catch (BuildError & e) { outputLocks.unlock(); buildUser.reset(); - worker.permanentFailure = true; - return done(BuildResult::InputRejected, {}, std::move(e)); + auto report = done(BuildResult::InputRejected, {}, std::move(e)); + report.permanentFailure = true; + return report; } /* This state will be reached when we get EOF on the child's @@ -2195,7 +2196,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs() if (wanted != got) { /* Throw an error after registering the path as valid. */ - worker.hashMismatch = true; + anyHashMismatchSeen = true; // XXX: shameless layering violation hack that makes the hash mismatch error at least not utterly worthless auto guessedUrl = getOr(drv->env, "urls", getOr(drv->env, "url", "(unknown)")); delayedException = std::make_exception_ptr( @@ -2282,7 +2283,7 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs() if (!worker.store.isValidPath(newInfo.path)) continue; ValidPathInfo oldInfo(*worker.store.queryPathInfo(newInfo.path)); if (newInfo.narHash != oldInfo.narHash) { - worker.checkMismatch = true; + anyCheckMismatchSeen = true; if (settings.runDiffHook || settings.keepFailed) { auto dst = worker.store.toRealPath(finalDestPath + checkSuffix); deletePath(dst); |