1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

getBuildLog: factor out resolving derivations

This commit is contained in:
Taeer Bar-Yam 2022-12-15 15:58:54 -05:00
parent 3b27181ee5
commit e5eb05c599
7 changed files with 16 additions and 19 deletions

View file

@ -502,14 +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 maybePath = getBuildDerivationPath(path);
if (!maybePath)
return std::nullopt;
auto drvPath = maybePath.value();
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);