aboutsummaryrefslogtreecommitdiff
path: root/src/nix/store-copy-log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/store-copy-log.cc')
-rw-r--r--src/nix/store-copy-log.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nix/store-copy-log.cc b/src/nix/store-copy-log.cc
index 079cd6b3e..22b3980c0 100644
--- a/src/nix/store-copy-log.cc
+++ b/src/nix/store-copy-log.cc
@@ -1,6 +1,7 @@
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
+#include "log-store.hh"
#include "sync.hh"
#include "thread-pool.hh"
@@ -26,7 +27,10 @@ struct CmdCopyLog : virtual CopyCommand, virtual InstallablesCommand
void run(ref<Store> srcStore) override
{
+ auto & srcLogStore = LogStore::require(*srcStore);
+
auto dstStore = getDstStore();
+ auto & dstLogStore = LogStore::require(*dstStore);
StorePathSet drvPaths;
@@ -35,8 +39,8 @@ struct CmdCopyLog : virtual CopyCommand, virtual InstallablesCommand
drvPaths.insert(drvPath);
for (auto & drvPath : drvPaths) {
- if (auto log = srcStore->getBuildLog(drvPath))
- dstStore->addBuildLog(drvPath, *log);
+ if (auto log = srcLogStore.getBuildLog(drvPath))
+ dstLogStore.addBuildLog(drvPath, *log);
else
throw Error("build log for '%s' is not available", srcStore->printStorePath(drvPath));
}