@@ -46,41 +46,41 @@ void printGCWarning()
46
46
47
47
void printMissing (ref<Store> store, const std::vector<DerivedPath> & paths, Verbosity lvl)
48
48
{
49
- auto missing = store->queryMissing (paths);
50
- printMissing (store, missing.willBuild , missing.willSubstitute , missing.unknown , missing.downloadSize , missing.narSize , lvl);
49
+ printMissing (store, store->queryMissing (paths), lvl);
51
50
}
52
51
53
52
54
- void printMissing (ref<Store> store, const StorePathSet & willBuild,
55
- const StorePathSet & willSubstitute, const StorePathSet & unknown,
56
- uint64_t downloadSize, uint64_t narSize, Verbosity lvl)
53
+ void printMissing (
54
+ ref<Store> store,
55
+ const MissingPaths & missing,
56
+ Verbosity lvl)
57
57
{
58
- if (!willBuild.empty ()) {
59
- if (willBuild.size () == 1 )
58
+ if (!missing. willBuild .empty ()) {
59
+ if (missing. willBuild .size () == 1 )
60
60
printMsg (lvl, " this derivation will be built:" );
61
61
else
62
- printMsg (lvl, " these %d derivations will be built:" , willBuild.size ());
63
- auto sorted = store->topoSortPaths (willBuild);
62
+ printMsg (lvl, " these %d derivations will be built:" , missing. willBuild .size ());
63
+ auto sorted = store->topoSortPaths (missing. willBuild );
64
64
reverse (sorted.begin (), sorted.end ());
65
65
for (auto & i : sorted)
66
66
printMsg (lvl, " %s" , store->printStorePath (i));
67
67
}
68
68
69
- if (!willSubstitute.empty ()) {
70
- const float downloadSizeMiB = downloadSize / (1024 .f * 1024 .f );
71
- const float narSizeMiB = narSize / (1024 .f * 1024 .f );
72
- if (willSubstitute.size () == 1 ) {
69
+ if (!missing. willSubstitute .empty ()) {
70
+ const float downloadSizeMiB = missing. downloadSize / (1024 .f * 1024 .f );
71
+ const float narSizeMiB = missing. narSize / (1024 .f * 1024 .f );
72
+ if (missing. willSubstitute .size () == 1 ) {
73
73
printMsg (lvl, " this path will be fetched (%.2f MiB download, %.2f MiB unpacked):" ,
74
74
downloadSizeMiB,
75
75
narSizeMiB);
76
76
} else {
77
77
printMsg (lvl, " these %d paths will be fetched (%.2f MiB download, %.2f MiB unpacked):" ,
78
- willSubstitute.size (),
78
+ missing. willSubstitute .size (),
79
79
downloadSizeMiB,
80
80
narSizeMiB);
81
81
}
82
82
std::vector<const StorePath *> willSubstituteSorted = {};
83
- std::for_each (willSubstitute.begin (), willSubstitute.end (),
83
+ std::for_each (missing. willSubstitute .begin (), missing. willSubstitute .end (),
84
84
[&](const StorePath &p) { willSubstituteSorted.push_back (&p); });
85
85
std::sort (willSubstituteSorted.begin (), willSubstituteSorted.end (),
86
86
[](const StorePath *lhs, const StorePath *rhs) {
@@ -93,10 +93,10 @@ void printMissing(ref<Store> store, const StorePathSet & willBuild,
93
93
printMsg (lvl, " %s" , store->printStorePath (*p));
94
94
}
95
95
96
- if (!unknown.empty ()) {
96
+ if (!missing. unknown .empty ()) {
97
97
printMsg (lvl, " don't know how to build these paths%s:" ,
98
98
(settings.readOnlyMode ? " (may be caused by read-only store access)" : " " ));
99
- for (auto & i : unknown)
99
+ for (auto & i : missing. unknown )
100
100
printMsg (lvl, " %s" , store->printStorePath (i));
101
101
}
102
102
}
0 commit comments