aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 14:37:20 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 15:33:40 +0000
commita678722d65d9bc11d76626cde63f11b21f79278d (patch)
treecd434dbe71bb1b27ec4b40f236ebd5fa1455fe98
parentea3e0c062d500308e818736cc51bbbbc1d13a9d5 (diff)
downloadpaludis-a678722d65d9bc11d76626cde63f11b21f79278d.tar.gz
paludis-a678722d65d9bc11d76626cde63f11b21f79278d.tar.xz
RemoveDecision creates an UninstallJob
-rw-r--r--paludis/resolver/orderer.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 1992f1d..4d65294 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -230,9 +230,27 @@ namespace
}
}
- void visit(const RemoveDecision &) PALUDIS_ATTRIBUTE((noreturn))
+ void visit(const RemoveDecision & d)
{
- throw InternalError(PALUDIS_HERE, "remove decision");
+ if (d.taken())
+ {
+ Log::get_instance()->message("resolver.orderer.job.remove_decision", ll_debug, lc_no_context)
+ << "taken " << resolution->resolvent() << " remove decision";
+
+ const std::tr1::shared_ptr<UninstallJob> uninstall_job(new UninstallJob(resolution,
+ d.shared_from_this()));
+ lists->jobs()->add(uninstall_job);
+ to_order.insert(uninstall_job->id());
+ }
+ else
+ {
+ Log::get_instance()->message("resolver.orderer.job.remove_decision", ll_debug, lc_no_context)
+ << "untaken " << resolution->resolvent() << " remove decision";
+
+ const std::tr1::shared_ptr<UninstallJob> uninstall_job(new UninstallJob(resolution, d.shared_from_this()));
+ lists->jobs()->add(uninstall_job);
+ lists->untaken_job_ids()->push_back(uninstall_job->id());
+ }
}
};
}