@@ -34,40 +34,40 @@ void printGCWarning()
3434}
3535
3636
37- void printMissing (ref<Store> store, const PathSet & paths)
37+ void printMissing (ref<Store> store, const PathSet & paths, Verbosity lvl )
3838{
3939 unsigned long long downloadSize, narSize;
4040 PathSet willBuild, willSubstitute, unknown;
4141 store->queryMissing (paths, willBuild, willSubstitute, unknown, downloadSize, narSize);
42- printMissing (store, willBuild, willSubstitute, unknown, downloadSize, narSize);
42+ printMissing (store, willBuild, willSubstitute, unknown, downloadSize, narSize, lvl );
4343}
4444
4545
4646void printMissing (ref<Store> store, const PathSet & willBuild,
4747 const PathSet & willSubstitute, const PathSet & unknown,
48- unsigned long long downloadSize, unsigned long long narSize)
48+ unsigned long long downloadSize, unsigned long long narSize, Verbosity lvl )
4949{
5050 if (!willBuild.empty ()) {
51- printInfo ( format ( " these derivations will be built:" ) );
51+ printMsg (lvl, " these derivations will be built:" );
5252 Paths sorted = store->topoSortPaths (willBuild);
5353 reverse (sorted.begin (), sorted.end ());
5454 for (auto & i : sorted)
55- printInfo ( format (" %1% " ) % i );
55+ printMsg (lvl, fmt (" %s " , i) );
5656 }
5757
5858 if (!willSubstitute.empty ()) {
59- printInfo ( format (" these paths will be fetched (%.2f MiB download, %.2f MiB unpacked):" )
60- % ( downloadSize / (1024.0 * 1024.0 ))
61- % ( narSize / (1024.0 * 1024.0 )));
59+ printMsg (lvl, fmt (" these paths will be fetched (%.2f MiB download, %.2f MiB unpacked):" ,
60+ downloadSize / (1024.0 * 1024.0 ),
61+ narSize / (1024.0 * 1024.0 )));
6262 for (auto & i : willSubstitute)
63- printInfo ( format (" %1% " ) % i );
63+ printMsg (lvl, fmt (" %s " , i) );
6464 }
6565
6666 if (!unknown.empty ()) {
67- printInfo ( format (" don't know how to build these paths%1%: " )
68- % (settings.readOnlyMode ? " (may be caused by read-only store access)" : " " ));
67+ printMsg (lvl, fmt (" don't know how to build these paths%s: " ,
68+ (settings.readOnlyMode ? " (may be caused by read-only store access)" : " " ) ));
6969 for (auto & i : unknown)
70- printInfo ( format (" %1% " ) % i );
70+ printMsg (lvl, fmt (" %s " , i) );
7171 }
7272}
7373
0 commit comments