aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/entry-points.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r--src/libstore/build/entry-points.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc
index f71fb35a6..f0f0e5519 100644
--- a/src/libstore/build/entry-points.cc
+++ b/src/libstore/build/entry-points.cc
@@ -1,5 +1,6 @@
#include "worker.hh"
#include "substitution-goal.hh"
+#include "create-derivation-and-realise-goal.hh"
#include "derivation-goal.hh"
#include "local-store.hh"
@@ -15,7 +16,7 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod
worker.run(goals);
- StorePathSet failed;
+ StringSet failed;
std::optional<Error> ex;
for (auto & i : goals) {
if (i->ex) {
@@ -25,8 +26,10 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod
ex = std::move(i->ex);
}
if (i->exitCode != Goal::ecSuccess) {
- if (auto i2 = dynamic_cast<DerivationGoal *>(i.get())) failed.insert(i2->drvPath);
- else if (auto i2 = dynamic_cast<PathSubstitutionGoal *>(i.get())) failed.insert(i2->storePath);
+ if (auto i2 = dynamic_cast<CreateDerivationAndRealiseGoal *>(i.get()))
+ failed.insert(i2->drvReq->to_string(*this));
+ else if (auto i2 = dynamic_cast<PathSubstitutionGoal *>(i.get()))
+ failed.insert(printStorePath(i2->storePath));
}
}
@@ -35,7 +38,7 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod
throw std::move(*ex);
} else if (!failed.empty()) {
if (ex) logError(ex->info());
- throw Error(worker.failingExitStatus(), "build of %s failed", showPaths(failed));
+ throw Error(worker.failingExitStatus(), "build of %s failed", concatStringsSep(", ", quoteStrings(failed)));
}
}