diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 1a3d23c48..6f02ee314 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -879,11 +879,7 @@ void runPostBuildHook( } -void appendLogTailErrorMsg( - const Store & store, - const StorePath & drvPath, - const std::list & logTail, - std::string & msg) +void DerivationGoal::appendLogTailErrorMsg(std::string & msg) { if (!logger->isVerbose() && !logTail.empty()) { msg += fmt(";\nlast %d log lines:\n", logTail.size()); @@ -900,7 +896,7 @@ void appendLogTailErrorMsg( // command will not put it at the start of the line unfortunately. msg += fmt("For full logs, run:\n " ANSI_BOLD "%s %s" ANSI_NORMAL, nixLogCommand, - store.printStorePath(drvPath)); + worker.store.printStorePath(drvPath)); } } @@ -947,7 +943,7 @@ Goal::Co DerivationGoal::hookDone() Magenta(worker.store.printStorePath(drvPath)), statusToString(status)); - appendLogTailErrorMsg(worker.store, drvPath, logTail, msg); + appendLogTailErrorMsg(msg); outputLocks.unlock(); diff --git a/src/libstore/include/nix/store/build/derivation-goal.hh b/src/libstore/include/nix/store/build/derivation-goal.hh index 659cea444..23675690d 100644 --- a/src/libstore/include/nix/store/build/derivation-goal.hh +++ b/src/libstore/include/nix/store/build/derivation-goal.hh @@ -63,13 +63,6 @@ void runPostBuildHook( const StorePath & drvPath, const StorePathSet & outputPaths); -/** Used internally */ -void appendLogTailErrorMsg( - const Store & store, - const StorePath & drvPath, - const std::list & logTail, - std::string & msg); - /** * A goal for building some or all of the outputs of a derivation. */ @@ -306,6 +299,8 @@ struct DerivationGoal : public Goal SingleDrvOutputs builtOutputs = {}, std::optional ex = {}); + void appendLogTailErrorMsg(std::string & msg); + StorePathSet exportReferences(const StorePathSet & storePaths); JobCategory jobCategory() const override { diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc index 7f921a23a..859056f10 100644 --- a/src/libstore/unix/build/local-derivation-goal.cc +++ b/src/libstore/unix/build/local-derivation-goal.cc @@ -623,7 +623,7 @@ Goal::Co LocalDerivationGoal::tryLocalBuild() Magenta(worker.store.printStorePath(drvPath)), statusToString(status)); - appendLogTailErrorMsg(worker.store, drvPath, logTail, msg); + appendLogTailErrorMsg(msg); if (diskFull) msg += "\nnote: build failure may have been caused by lack of free disk space";