mirror of
https://github.com/NixOS/nix.git
synced 2025-11-29 05:31:00 +01:00
Revert "Merge pull request #14381 from NixOS/backport-14364-to-2.31-maintenance"
This reverts commit264cc2e2b2, reversing changes made to3cca112d79.
This commit is contained in:
parent
d32b580243
commit
7358e50193
10 changed files with 30 additions and 24 deletions
|
|
@ -6,7 +6,6 @@
|
|||
#include "nix/main/loggers.hh"
|
||||
#include "nix/main/progress-bar.hh"
|
||||
#include "nix/util/signals.hh"
|
||||
#include "nix/util/util.hh"
|
||||
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
|
|
@ -65,19 +64,18 @@ void printMissing(ref<Store> store, const MissingPaths & missing, Verbosity lvl)
|
|||
}
|
||||
|
||||
if (!missing.willSubstitute.empty()) {
|
||||
const float downloadSizeMiB = missing.downloadSize / (1024.f * 1024.f);
|
||||
const float narSizeMiB = missing.narSize / (1024.f * 1024.f);
|
||||
if (missing.willSubstitute.size() == 1) {
|
||||
printMsg(
|
||||
lvl,
|
||||
"this path will be fetched (%s download, %s unpacked):",
|
||||
renderSize(missing.downloadSize),
|
||||
renderSize(missing.narSize));
|
||||
lvl, "this path will be fetched (%.2f MiB download, %.2f MiB unpacked):", downloadSizeMiB, narSizeMiB);
|
||||
} else {
|
||||
printMsg(
|
||||
lvl,
|
||||
"these %d paths will be fetched (%s download, %s unpacked):",
|
||||
"these %d paths will be fetched (%.2f MiB download, %.2f MiB unpacked):",
|
||||
missing.willSubstitute.size(),
|
||||
renderSize(missing.downloadSize),
|
||||
renderSize(missing.narSize));
|
||||
downloadSizeMiB,
|
||||
narSizeMiB);
|
||||
}
|
||||
std::vector<const StorePath *> willSubstituteSorted = {};
|
||||
std::for_each(missing.willSubstitute.begin(), missing.willSubstitute.end(), [&](const StorePath & p) {
|
||||
|
|
@ -408,7 +406,7 @@ RunPager::~RunPager()
|
|||
PrintFreed::~PrintFreed()
|
||||
{
|
||||
if (show)
|
||||
std::cout << fmt("%d store paths deleted, %s freed\n", results.paths.size(), renderSize(results.bytesFreed));
|
||||
std::cout << fmt("%d store paths deleted, %s freed\n", results.paths.size(), showBytes(results.bytesFreed));
|
||||
}
|
||||
|
||||
} // namespace nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue