aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-15 17:20:24 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-15 17:20:24 +0000
commitb9c17411d001b3a5f990958b680fb2b47f4acdd0 (patch)
tree902f2ba06dd42d2568a9f180c173cdd7fb2d0c45
parent58e21d0873763bfa2b563204447066e3d02a2aa6 (diff)
downloadpaludis-b9c17411d001b3a5f990958b680fb2b47f4acdd0.tar.gz
paludis-b9c17411d001b3a5f990958b680fb2b47f4acdd0.tar.xz
Install post deps much later on if necessary. Fixes: ticket:13
-rw-r--r--paludis/dep_list/dep_list.cc12
-rw-r--r--paludis/dep_list/dep_list_TEST.cc4
2 files changed, 13 insertions, 3 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index bdc7be2..c81f3c0 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -981,7 +981,17 @@ DepList::add_postdeps(DepAtom::ConstPointer d, const DepListDepsOption opt, cons
{
try
{
- add_in_role(d, s + " dependencies as post dependencies");
+ try
+ {
+ add_in_role(d, s + " dependencies as post dependencies");
+ }
+ catch (const CircularDependencyError &)
+ {
+ Save<DepListCircularOption> save_circular(&_imp->opts.circular, dl_circular_discard);
+ Save<MergeList::iterator> save_merge_list_insert_position(&_imp->merge_list_insert_position,
+ _imp->merge_list.end());
+ add_in_role(d, s + " dependencies as post dependencies with cycle breaking");
+ }
}
catch (const DepListError & e)
{
diff --git a/paludis/dep_list/dep_list_TEST.cc b/paludis/dep_list/dep_list_TEST.cc
index ea99644..768578c 100644
--- a/paludis/dep_list/dep_list_TEST.cc
+++ b/paludis/dep_list/dep_list_TEST.cc
@@ -1062,14 +1062,14 @@ namespace test_cases
void populate_repo()
{
repo->add_version("cat", "one", "1")->deps.build_depend_string = "|| ( cat/two cat/three )";
- repo->add_version("cat", "two", "1")->deps.run_depend_string = "cat/one";
+ repo->add_version("cat", "two", "1")->deps.post_depend_string = "cat/one";
repo->add_version("cat", "three", "1");
}
void populate_expected()
{
merge_target="cat/one";
- expected.push_back("cat/three-1:0::repo");
+ expected.push_back("cat/two-1:0::repo");
expected.push_back("cat/one-1:0::repo");
}
} test_dep_list_43;