From 16fb7d8d95a8bc81e7df885ab4167c8a03f1dddf Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 22 Jun 2021 10:46:29 +0200 Subject: [PATCH] Display the diverging paths in case of a realisation mismatch --- src/libstore/build/drv-output-substitution-goal.cc | 9 +++++++-- src/libstore/local-store.cc | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/libstore/build/drv-output-substitution-goal.cc b/src/libstore/build/drv-output-substitution-goal.cc index ec3a8d758..be270d079 100644 --- a/src/libstore/build/drv-output-substitution-goal.cc +++ b/src/libstore/build/drv-output-substitution-goal.cc @@ -65,9 +65,14 @@ void DrvOutputSubstitutionGoal::tryNext() if (auto localOutputInfo = worker.store.queryRealisation(depId); localOutputInfo && localOutputInfo->outPath != depPath) { warn( - "substituter '%s' has an incompatible realisation for '%s', ignoring", + "substituter '%s' has an incompatible realisation for '%s', ignoring.\n" + "Local: %s\n" + "Remote: %s", sub->getUri(), - depId.to_string()); + depId.to_string(), + worker.store.printStorePath(localOutputInfo->outPath), + worker.store.printStorePath(depPath) + ); tryNext(); return; } diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 064f7a432..d7c7f8e1d 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -732,8 +732,13 @@ void LocalStore::registerDrvOutput(const Realisation & info) .exec(); } else { throw Error("Trying to register a realisation of '%s', but we already " - "have another one locally", - info.id.to_string()); + "have another one locally.\n" + "Local: %s\n" + "Remote: %s", + info.id.to_string(), + printStorePath(oldR->outPath), + printStorePath(info.outPath) + ); } } else { state->stmts->RegisterRealisedOutput.use()