mirror of https://github.com/microsoft/vcpkg.git
[vcpkg] Fix inter-feature references
This commit is contained in:
parent
b0bea71d57
commit
65e95f6348
|
|
@ -821,6 +821,21 @@ namespace UnitTest1
|
|||
Assert::AreEqual("cpr", remove_plan[0].spec.name().c_str());
|
||||
Assert::AreEqual("curl", remove_plan[1].spec.name().c_str());
|
||||
}
|
||||
|
||||
TEST_METHOD(features_depend_core_remove_scheme_2)
|
||||
{
|
||||
std::vector<std::unique_ptr<StatusParagraph>> pghs;
|
||||
pghs.push_back(make_status_pgh("curl", "", "", "x64"));
|
||||
pghs.push_back(make_status_feature_pgh("curl", "a", "", "x64"));
|
||||
pghs.push_back(make_status_feature_pgh("curl", "b", "curl[a]", "x64"));
|
||||
StatusParagraphs status_db(std::move(pghs));
|
||||
|
||||
auto remove_plan = Dependencies::create_remove_plan(
|
||||
{unsafe_pspec("curl", Triplet::from_canonical_name("x64"))}, status_db);
|
||||
|
||||
Assert::AreEqual(size_t(1), remove_plan.size());
|
||||
Assert::AreEqual("curl", remove_plan[0].spec.name().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
class UpgradePlanTests : public TestClass<UpgradePlanTests>
|
||||
|
|
|
|||
|
|
@ -317,6 +317,8 @@ namespace vcpkg::Dependencies
|
|||
{
|
||||
dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end());
|
||||
}
|
||||
Util::unstable_keep_if(deps,
|
||||
[&](auto&& e) { return e != an_installed_package->package.spec.name(); });
|
||||
// </hack>
|
||||
if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue