diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index b0081f709..c50054caf 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -100,8 +100,7 @@ Goal::Co DerivationGoal::haveDerivation(bool storeDerivation) them. */ if (settings.useSubstitutes && drvOptions.substitutesAllowed()) { if (!checkResult) - waitees.insert(upcast_goal(worker.makeDrvOutputSubstitutionGoal( - DrvOutput{outputHash, wantedOutput}, buildMode == bmRepair ? Repair : NoRepair))); + waitees.insert(upcast_goal(worker.makeDrvOutputSubstitutionGoal(DrvOutput{outputHash, wantedOutput}))); else { auto * cap = getDerivationCA(*drv); waitees.insert(upcast_goal(worker.makePathSubstitutionGoal( @@ -171,8 +170,6 @@ Goal::Co DerivationGoal::haveDerivation(bool storeDerivation) auto outputHashes = staticOutputHashes(worker.evalStore, *drv); auto resolvedHashes = staticOutputHashes(worker.store, drvResolved); - StorePathSet outputPaths; - auto outputHash = get(outputHashes, wantedOutput); auto resolvedHash = get(resolvedHashes, wantedOutput); if ((!outputHash) || (!resolvedHash)) @@ -212,7 +209,6 @@ Goal::Co DerivationGoal::haveDerivation(bool storeDerivation) worker.store.signRealisation(newRealisation); worker.store.registerDrvOutput(newRealisation); } - outputPaths.insert(realisation.outPath); auto status = success.status; if (status == BuildResult::Success::AlreadyValid) diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc index 209d6d542..6635e214d 100644 --- a/src/libstore/build/drv-output-substitution-goal.cc +++ b/src/libstore/build/drv-output-substitution-goal.cc @@ -8,8 +8,7 @@ namespace nix { -DrvOutputSubstitutionGoal::DrvOutputSubstitutionGoal( - const DrvOutput & id, Worker & worker, RepairFlag repair, std::optional ca) +DrvOutputSubstitutionGoal::DrvOutputSubstitutionGoal(const DrvOutput & id, Worker & worker) : Goal(worker, init()) , id(id) { diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index d23c53e77..3663a2c91 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -104,10 +104,9 @@ Worker::makePathSubstitutionGoal(const StorePath & path, RepairFlag repair, std: return initGoalIfNeeded(substitutionGoals[path], path, *this, repair, ca); } -std::shared_ptr -Worker::makeDrvOutputSubstitutionGoal(const DrvOutput & id, RepairFlag repair, std::optional ca) +std::shared_ptr Worker::makeDrvOutputSubstitutionGoal(const DrvOutput & id) { - return initGoalIfNeeded(drvOutputSubstitutionGoals[id], id, *this, repair, ca); + return initGoalIfNeeded(drvOutputSubstitutionGoals[id], id, *this); } GoalPtr Worker::makeGoal(const DerivedPath & req, BuildMode buildMode) diff --git a/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh b/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh index b42336427..c3ee9019f 100644 --- a/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh +++ b/src/libstore/include/nix/store/build/drv-output-substitution-goal.hh @@ -29,14 +29,7 @@ class DrvOutputSubstitutionGoal : public Goal DrvOutput id; public: - DrvOutputSubstitutionGoal( - const DrvOutput & id, - Worker & worker, - RepairFlag repair = NoRepair, - std::optional ca = std::nullopt); - - typedef void (DrvOutputSubstitutionGoal::*GoalState)(); - GoalState state; + DrvOutputSubstitutionGoal(const DrvOutput & id, Worker & worker); Co init(); Co realisationFetched(Goals waitees, std::shared_ptr outputInfo, nix::ref sub); diff --git a/src/libstore/include/nix/store/build/worker.hh b/src/libstore/include/nix/store/build/worker.hh index bb0202dfd..173f7b222 100644 --- a/src/libstore/include/nix/store/build/worker.hh +++ b/src/libstore/include/nix/store/build/worker.hh @@ -240,8 +240,7 @@ public: */ std::shared_ptr makePathSubstitutionGoal( const StorePath & storePath, RepairFlag repair = NoRepair, std::optional ca = std::nullopt); - std::shared_ptr makeDrvOutputSubstitutionGoal( - const DrvOutput & id, RepairFlag repair = NoRepair, std::optional ca = std::nullopt); + std::shared_ptr makeDrvOutputSubstitutionGoal(const DrvOutput & id); /** * Make a goal corresponding to the `DerivedPath`.