about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-16T14·38+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-16T18·56+0200
commit40bffe0a43e5f2f320c6bae7e39ea9c26906451d (patch)
tree6e7d46a8b252201bd1ca0632e167f5e76ef0aab5 /src/libstore/store-api.cc
parentdff12b38f9d836fd0a58abc41286a9ad6b602aa5 (diff)
Progress indicator: Cleanup
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 5aa3dcfd26..f520210615 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -565,7 +565,7 @@ void Store::buildPaths(const PathSet & paths, BuildMode buildMode)
 void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
     const Path & storePath, RepairFlag repair, CheckSigsFlag checkSigs)
 {
-    Activity act(actCopyPath, fmt("copying path '%s'", storePath));
+    Activity act(*logger, actCopyPath, fmt("copying path '%s'", storePath));
 
     auto info = srcStore->queryPathInfo(storePath);
 
@@ -621,7 +621,7 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const PathSet & storePa
     for (auto & path : storePaths)
         if (!valid.count(path)) missing.insert(path);
 
-    Activity act(actCopyPaths, fmt("copying %d paths", missing.size()));
+    Activity act(*logger, actCopyPaths, fmt("copying %d paths", missing.size()));
 
     std::atomic<size_t> nrDone{0};
     std::atomic<uint64_t> bytesExpected{0};
@@ -646,7 +646,7 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const PathSet & storePa
             auto info = srcStore->queryPathInfo(storePath);
 
             bytesExpected += info->narSize;
-            logger->event(evSetExpected, act, actCopyPath, bytesExpected);
+            act.setExpected(actCopyPath, bytesExpected);
 
             return info->references;
         },
@@ -655,7 +655,6 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const PathSet & storePa
             checkInterrupt();
 
             if (!dstStore->isValidPath(storePath)) {
-                printInfo("copying '%s'...", storePath);
                 MaintainCount<decltype(nrRunning)> mc(nrRunning);
                 showProgress();
                 copyStorePath(srcStore, dstStore, storePath, repair, checkSigs);