mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Avoid fmt
when constructor already does it
There is a correctnes issue here, but #3724 will fix that. This is just a cleanup for brevity's sake.
This commit is contained in:
parent
b135de2b5f
commit
75b62e5260
8 changed files with 73 additions and 51 deletions
|
@ -60,37 +60,37 @@ void printMissing(ref<Store> store, const StorePathSet & willBuild,
|
|||
{
|
||||
if (!willBuild.empty()) {
|
||||
if (willBuild.size() == 1)
|
||||
printMsg(lvl, fmt("this derivation will be built:"));
|
||||
printMsg(lvl, "this derivation will be built:");
|
||||
else
|
||||
printMsg(lvl, fmt("these %d derivations will be built:", willBuild.size()));
|
||||
printMsg(lvl, "these %d derivations will be built:", willBuild.size());
|
||||
auto sorted = store->topoSortPaths(willBuild);
|
||||
reverse(sorted.begin(), sorted.end());
|
||||
for (auto & i : sorted)
|
||||
printMsg(lvl, fmt(" %s", store->printStorePath(i)));
|
||||
printMsg(lvl, " %s", store->printStorePath(i));
|
||||
}
|
||||
|
||||
if (!willSubstitute.empty()) {
|
||||
const float downloadSizeMiB = downloadSize / (1024.f * 1024.f);
|
||||
const float narSizeMiB = narSize / (1024.f * 1024.f);
|
||||
if (willSubstitute.size() == 1) {
|
||||
printMsg(lvl, fmt("this path will be fetched (%.2f MiB download, %.2f MiB unpacked):",
|
||||
printMsg(lvl, "this path will be fetched (%.2f MiB download, %.2f MiB unpacked):",
|
||||
downloadSizeMiB,
|
||||
narSizeMiB));
|
||||
narSizeMiB);
|
||||
} else {
|
||||
printMsg(lvl, fmt("these %d paths will be fetched (%.2f MiB download, %.2f MiB unpacked):",
|
||||
printMsg(lvl, "these %d paths will be fetched (%.2f MiB download, %.2f MiB unpacked):",
|
||||
willSubstitute.size(),
|
||||
downloadSizeMiB,
|
||||
narSizeMiB));
|
||||
narSizeMiB);
|
||||
}
|
||||
for (auto & i : willSubstitute)
|
||||
printMsg(lvl, fmt(" %s", store->printStorePath(i)));
|
||||
printMsg(lvl, " %s", store->printStorePath(i));
|
||||
}
|
||||
|
||||
if (!unknown.empty()) {
|
||||
printMsg(lvl, fmt("don't know how to build these paths%s:",
|
||||
(settings.readOnlyMode ? " (may be caused by read-only store access)" : "")));
|
||||
printMsg(lvl, "don't know how to build these paths%s:",
|
||||
(settings.readOnlyMode ? " (may be caused by read-only store access)" : ""));
|
||||
for (auto & i : unknown)
|
||||
printMsg(lvl, fmt(" %s", store->printStorePath(i)));
|
||||
printMsg(lvl, " %s", store->printStorePath(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue