mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Aso track the output path of the realisation dependencies
This commit is contained in:
parent
cb46d70794
commit
1f3ff0d193
7 changed files with 46 additions and 39 deletions
|
@ -254,25 +254,22 @@ StorePaths Store::topoSortPaths(const StorePathSet & paths)
|
|||
}});
|
||||
}
|
||||
|
||||
std::set<DrvOutput> drvOutputReferences(
|
||||
std::map<DrvOutput, StorePath> drvOutputReferences(
|
||||
const std::set<Realisation> inputRealisations,
|
||||
const StorePathSet pathReferences)
|
||||
{
|
||||
std::set<DrvOutput> res;
|
||||
std::map<DrvOutput, StorePath> res;
|
||||
|
||||
std::map<StorePath, std::set<DrvOutput>> inputsByOutputPath;
|
||||
for (const auto & input : inputRealisations)
|
||||
inputsByOutputPath[input.outPath].insert(input.id);
|
||||
|
||||
for (const auto & path : pathReferences) {
|
||||
auto theseInputs = inputsByOutputPath[path];
|
||||
res.insert(theseInputs.begin(), theseInputs.end());
|
||||
for (const auto & input : inputRealisations) {
|
||||
if (pathReferences.count(input.outPath)) {
|
||||
res.insert({input.id, input.outPath});
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
std::set<DrvOutput> drvOutputReferences(
|
||||
std::map<DrvOutput, StorePath> drvOutputReferences(
|
||||
Store & store,
|
||||
const Derivation & drv,
|
||||
const StorePath & outputPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue