aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-02 13:01:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-02 13:01:40 +0000
commit89a558cbe7ac3c2ec6c7d71fe0c820bb4f074f79 (patch)
treeebb8fd60b57e4c307f78256887c055e14432ad09
parent4d2bf9d69120b4b22a1047bc427e4f830e37ad5d (diff)
downloadpaludis-89a558cbe7ac3c2ec6c7d71fe0c820bb4f074f79.tar.gz
paludis-89a558cbe7ac3c2ec6c7d71fe0c820bb4f074f79.tar.xz
Change handling of virtuals provided by multiple packages
-rw-r--r--paludis/dep_list/dep_list.cc2
-rw-r--r--paludis/dep_list/dep_list_TEST.cc18
2 files changed, 19 insertions, 1 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 06b88b9..3f20497 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -1239,7 +1239,7 @@ DepList::add_package(const PackageDatabaseEntry & p, std::tr1::shared_ptr<const
MergeListIndex::iterator zz(std::find_if(z.first, z.second,
MatchDepListEntryAgainstPackageDepSpec(_imp->env, pp.get())));
- if (z.first != z.second)
+ if (zz != z.second)
continue;
std::tr1::shared_ptr<const VersionMetadata> m;
diff --git a/paludis/dep_list/dep_list_TEST.cc b/paludis/dep_list/dep_list_TEST.cc
index 79ef7f3..eca7998 100644
--- a/paludis/dep_list/dep_list_TEST.cc
+++ b/paludis/dep_list/dep_list_TEST.cc
@@ -1247,6 +1247,24 @@ namespace test_cases
}
} test_dep_list_60;
+ struct DepListTestCase61 : DepListTestCase<61>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->ebuild_interface->provide_string = "virtual/foo";
+ repo->add_version("cat", "two", "2")->ebuild_interface->provide_string = "virtual/foo";
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one cat/two";
+ expected.push_back("cat/one-1:0::repo");
+ expected.push_back("virtual/foo-1:0::virtuals");
+ expected.push_back("cat/two-2:0::repo");
+ expected.push_back("virtual/foo-2:0::virtuals");
+ }
+ } test_dep_list_61;
+
/**
* \test Test DepList transactional add behaviour.
*