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 specs_as_set(specs.cbegin(), specs.cend()); - return Graphs::topological_sort(specs, InstallAdjacencyProvider{ paths, status_db, specs_as_set }); + std::vector 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 create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db)