mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
LocalStore::querySubstitutablePaths(): Implement using queryValidPaths()
This commit is contained in:
parent
844219f364
commit
0c85ef7090
1 changed files with 3 additions and 7 deletions
|
@ -783,16 +783,12 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
||||||
if (!settings.useSubstitutes) return PathSet();
|
if (!settings.useSubstitutes) return PathSet();
|
||||||
PathSet res;
|
PathSet res;
|
||||||
for (auto & sub : getDefaultSubstituters()) {
|
for (auto & sub : getDefaultSubstituters()) {
|
||||||
|
if (res.size() == paths.size()) break;
|
||||||
if (sub->storeDir != storeDir) continue;
|
if (sub->storeDir != storeDir) continue;
|
||||||
if (!sub->wantMassQuery()) continue;
|
if (!sub->wantMassQuery()) continue;
|
||||||
for (auto & path : paths) {
|
for (auto path : sub->queryValidPaths(paths))
|
||||||
if (res.count(path)) continue;
|
|
||||||
debug(format("checking substituter ‘%s’ for path ‘%s’")
|
|
||||||
% sub->getUri() % path);
|
|
||||||
if (sub->isValidPath(path))
|
|
||||||
res.insert(path);
|
res.insert(path);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue