aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-06-03 19:22:20 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-06-03 19:22:20 +0000
commit5705323fb372a1d7c0516058453d2c0fa1e3ab42 (patch)
treecb1cce0d5696097864faeae441adfce8cd9c4998
parent86ebe09b66faeec132016b04fd192752b0874d50 (diff)
downloadpaludis-5705323fb372a1d7c0516058453d2c0fa1e3ab42.tar.gz
paludis-5705323fb372a1d7c0516058453d2c0fa1e3ab42.tar.xz
Fix range re-writing.
-rw-r--r--paludis/dep_list/dep_list.cc7
-rw-r--r--paludis/dep_list/dep_list_TEST.cc69
2 files changed, 71 insertions, 5 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 9f22dc0..457428f 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -666,11 +666,8 @@ DepList::AddVisitor::visit_sequence(const AnyDepSpec &,
if (r.spec())
{
TreeLeaf<DependencySpecTree, PackageDepSpec> rr(r.spec());
- if (d->already_installed(rr, destinations))
- {
- d->add_not_top_level(rr, destinations);
- return;
- }
+ d->add_not_top_level(rr, destinations);
+ return;
}
/* see if any of our children is already installed. if any is, add it so that
diff --git a/paludis/dep_list/dep_list_TEST.cc b/paludis/dep_list/dep_list_TEST.cc
index d4a67f8..216ad94 100644
--- a/paludis/dep_list/dep_list_TEST.cc
+++ b/paludis/dep_list/dep_list_TEST.cc
@@ -1296,6 +1296,75 @@ namespace test_cases
} test_dep_list_62;
/**
+ * \test Test DepList resolution behaviour.
+ *
+ */
+ struct DepListTestCase63 : DepListTestCase<63>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->deps_interface->set_build_depend("|| ( =cat/two-1 =cat/two-2 )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "two", "2");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/two-2:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_63;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ */
+ struct DepListTestCase64 : DepListTestCase<64>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->deps_interface->set_build_depend("|| ( =cat/two-1 =cat/two-2 )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "two", "2");
+ installed_repo->add_version("cat", "two", "1");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/two-2:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_64;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ */
+ struct DepListTestCase65 : DepListTestCase<65>
+ {
+ void set_options(DepListOptions & opts)
+ {
+ opts.override_masks += dl_override_tilde_keywords;
+ }
+
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->deps_interface->set_build_depend("|| ( =cat/two-2 =cat/two-1 )");
+ repo->add_version("cat", "two", "1")->ebuild_interface->set_keywords("~test");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/two-1:0::repo(M)");
+ expected.push_back("cat/two-1:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_65;
+
+ /**
* \test Test DepList transactional add behaviour.
*
*/