aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-12 21:41:54 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-12 22:05:04 -0700
commite78827e8cc5c0c75efd8c2c687fc007a922b69a3 (patch)
tree752196541d125cfbf370c6a2f6e038f61a24e227
parent2fa87fbb0aba1eba96994beb0c7b32d52f7f7161 (diff)
downloadvcpkg-e78827e8cc5c0c75efd8c2c687fc007a922b69a3.tar.gz
vcpkg-e78827e8cc5c0c75efd8c2c687fc007a922b69a3.zip
Remove AUTO_SELECTED && ALREADY_INSTALLED packages from the install plan
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index 9952a3f92..9ecf57023 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -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)