mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
Remove AUTO_SELECTED && ALREADY_INSTALLED packages from the install plan
This commit is contained in:
parent
2fa87fbb0a
commit
e78827e8cc
@ -142,7 +142,13 @@ namespace vcpkg::Dependencies
|
||||
};
|
||||
|
||||
const std::unordered_set<PackageSpec> specs_as_set(specs.cbegin(), specs.cend());
|
||||
return Graphs::topological_sort(specs, InstallAdjacencyProvider{ paths, status_db, specs_as_set });
|
||||
std::vector<InstallPlanAction> toposort = Graphs::topological_sort(specs, InstallAdjacencyProvider{ paths, status_db, specs_as_set });
|
||||
toposort.erase(std::remove_if(toposort.begin(), toposort.end(), [](const InstallPlanAction& p)
|
||||
{
|
||||
return p.request_type == RequestType::AUTO_SELECTED && p.plan_type == InstallPlanType::ALREADY_INSTALLED;
|
||||
}), toposort.end());
|
||||
|
||||
return toposort;
|
||||
}
|
||||
|
||||
std::vector<RemovePlanAction> create_remove_plan(const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db)
|
||||
|
Loading…
x
Reference in New Issue
Block a user