aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 14:27:28 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-14 14:27:28 -0500
commit056cc1c1b903114f59c536dd9821b46f68516f4e (patch)
tree7a93772a077355c152c12042ccd9392abc86eb5e /src/libstore/binary-cache-store.cc
parent2e7be46e73293f729358eefc5b464dcb7e2d76bf (diff)
parent2e41ae9f93af0be2c778dda97e0ee9544a8aca1f (diff)
Merge remote-tracking branch 'upstream/master' into path-info
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 aa5aafdbf..087b37655 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -530,22 +530,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);