mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
queryMissing(): Return a struct
...instead of having a bunch of pass-by-reference arguments.
This commit is contained in:
parent
81672fee2a
commit
53a743b8c5
11 changed files with 59 additions and 79 deletions
|
|
@ -794,15 +794,12 @@ void Store::substitutePaths(const StorePathSet & paths)
|
|||
for (auto & path : paths)
|
||||
if (!path.isDerivation())
|
||||
paths2.emplace_back(DerivedPath::Opaque{path});
|
||||
uint64_t downloadSize, narSize;
|
||||
StorePathSet willBuild, willSubstitute, unknown;
|
||||
queryMissing(paths2,
|
||||
willBuild, willSubstitute, unknown, downloadSize, narSize);
|
||||
auto missing = queryMissing(paths2);
|
||||
|
||||
if (!willSubstitute.empty())
|
||||
if (!missing.willSubstitute.empty())
|
||||
try {
|
||||
std::vector<DerivedPath> subs;
|
||||
for (auto & p : willSubstitute) subs.emplace_back(DerivedPath::Opaque{p});
|
||||
for (auto & p : missing.willSubstitute) subs.emplace_back(DerivedPath::Opaque{p});
|
||||
buildPaths(subs);
|
||||
} catch (Error & e) {
|
||||
logWarning(e.info());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue