aboutsummaryrefslogtreecommitdiff
path: root/src/nix/sigs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/sigs.cc')
-rw-r--r--src/nix/sigs.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/nix/sigs.cc b/src/nix/sigs.cc
index 69073d884..9932aa4a9 100644
--- a/src/nix/sigs.cc
+++ b/src/nix/sigs.cc
@@ -1,5 +1,4 @@
#include "command.hh"
-#include "progress-bar.hh"
#include "shared.hh"
#include "store-api.hh"
#include "thread-pool.hh"
@@ -38,21 +37,15 @@ struct CmdCopySigs : StorePathsCommand
for (auto & s : substituterUris)
substituters.push_back(openStoreAt(s));
- ProgressBar progressBar;
-
ThreadPool pool;
- std::atomic<size_t> done{0};
+ std::string doneLabel = "done";
std::atomic<size_t> added{0};
- auto showProgress = [&]() {
- return (format("[%d/%d done]") % done % storePaths.size()).str();
- };
-
- progressBar.updateStatus(showProgress());
+ logger->setExpected(doneLabel, storePaths.size());
auto doPath = [&](const Path & storePath) {
- auto activity(progressBar.startActivity(format("getting signatures for ā€˜%sā€™") % storePath));
+ Activity act(*logger, lvlInfo, format("getting signatures for ā€˜%sā€™") % storePath);
checkInterrupt();
@@ -83,8 +76,7 @@ struct CmdCopySigs : StorePathsCommand
added += newSigs.size();
}
- done++;
- progressBar.updateStatus(showProgress());
+ logger->incProgress(doneLabel);
};
for (auto & storePath : storePaths)
@@ -92,8 +84,6 @@ struct CmdCopySigs : StorePathsCommand
pool.process();
- progressBar.done();
-
printMsg(lvlInfo, format("imported %d signatures") % added);
}
};