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

Store: Add a method for getting build logs

This allows various Store implementations to provide different ways to
get build logs. For example, BinaryCacheStore can get the build logs
from the binary cache.

Also, remove the log-servers option since we can use substituters for
this.
This commit is contained in:
Eelco Dolstra 2017-03-13 12:07:50 +01:00
parent 96443e94a1
commit 0afeb7f51e
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
9 changed files with 50 additions and 83 deletions

View file

@ -566,6 +566,11 @@ public:
if they lack a signature. */
virtual bool isTrusted() { return false; }
/* Return the build log of the specified store path, if available,
or null otherwise. */
virtual std::shared_ptr<std::string> getBuildLog(const Path & path)
{ return nullptr; }
protected:
Stats stats;
@ -579,6 +584,7 @@ public:
const Path rootDir;
const Path stateDir;
const Path logDir;
const static string drvsLogDir;
LocalFSStore(const Params & params);
@ -595,6 +601,8 @@ public:
{
return getRealStoreDir() + "/" + baseNameOf(storePath);
}
std::shared_ptr<std::string> getBuildLog(const Path & path) override;
};