aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-01-13 11:00:56 +0100
committerGitHub <noreply@github.com>2023-01-13 11:00:56 +0100
commitbdeb6de889219cb9d1ba94b4adc75b0d8000e1b2 (patch)
tree7248384116e25e1078aa884972337de198ba493b /src/libstore/binary-cache-store.cc
parentdda71d3726a1767dbd4674cde6e130093e290183 (diff)
parente5eb05c5990d837e0bbc1529e3b5b167f7015be0 (diff)
Merge pull request #7430 from tweag/ca/fix-nix-log
Ca/fix nix log
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-rw-r--r--src/libstore/binary-cache-store.cc17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc
index 149d414d3..05bf0501d 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -502,22 +502,9 @@ void BinaryCacheStore::addSignatures(const StorePath & storePath, const StringSe
writeNarInfo(narInfo);
}
-std::optional<std::string> BinaryCacheStore::getBuildLog(const StorePath & path)
+std::optional<std::string> BinaryCacheStore::getBuildLogExact(const StorePath & path)
{
- auto drvPath = path;
-
- if (!path.isDerivation()) {
- try {
- auto info = queryPathInfo(path);
- // FIXME: add a "Log" field to .narinfo
- if (!info->deriver) return std::nullopt;
- drvPath = *info->deriver;
- } catch (InvalidPath &) {
- return std::nullopt;
- }
- }
-
- auto logPath = "log/" + std::string(baseNameOf(printStorePath(drvPath)));
+ auto logPath = "log/" + std::string(baseNameOf(printStorePath(path)));
debug("fetching build log from binary cache '%s/%s'", getUri(), logPath);