aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 20:20:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 21:56:16 +0000
commit2ae50ba059835a056ac724a34d985fb73ae49cf6 (patch)
tree94039bf47473ac52f8378ae1a60c8f7c688f8e29
parent874ec910f672eb770f76ca3911402ffd8ac8dd6c (diff)
downloadpaludis-2ae50ba059835a056ac724a34d985fb73ae49cf6.tar.gz
paludis-2ae50ba059835a056ac724a34d985fb73ae49cf6.tar.xz
Use annotations rather than block_kind
-rw-r--r--paludis/resolver/decider.cc19
-rw-r--r--paludis/resolver/orderer.cc18
2 files changed, 19 insertions, 18 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 9575433..9ee4c43 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -72,6 +72,7 @@
#include <paludis/changed_choices.hh>
#include <paludis/additional_package_dep_spec_requirement.hh>
#include <paludis/partially_made_package_dep_spec.hh>
+#include <paludis/dep_spec_annotations.hh>
#include <paludis/util/pimp-impl.hh>
@@ -646,24 +647,24 @@ Decider::_make_constraints_from_blocker(
const std::shared_ptr<ConstraintSequence> result(std::make_shared<ConstraintSequence>());
bool nothing_is_fine_too(true), force_unable(false);
- switch (spec.block_kind())
+ switch (find_blocker_role_in_annotations(spec.maybe_annotations()))
{
- case bk_weak:
- case bk_strong:
- case bk_uninstall_blocked_before:
- case bk_uninstall_blocked_after:
+ case dsar_blocker_weak:
+ case dsar_blocker_strong:
+ case dsar_blocker_uninstall_blocked_before:
+ case dsar_blocker_uninstall_blocked_after:
break;
- case bk_manual:
+ case dsar_blocker_manual:
force_unable = ! _block_dep_spec_already_met(spec, maybe_from_package_id_from_reason(reason), resolution->resolvent());
break;
- case bk_upgrade_blocked_before:
+ case dsar_blocker_upgrade_blocked_before:
nothing_is_fine_too = ! _block_dep_spec_already_met(spec, maybe_from_package_id_from_reason(reason), resolution->resolvent());
break;
- case last_bk:
- break;
+ default:
+ throw InternalError(PALUDIS_HERE, "unexpected role");
}
DestinationTypes destination_types(_get_destination_types_for_blocker(spec, reason));
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 0101254..1b1df0e 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -264,21 +264,21 @@ namespace
{
bool normal(true);
if (r.sanitised_dependency().spec().if_block())
- switch (r.sanitised_dependency().spec().if_block()->block_kind())
+ switch (find_blocker_role_in_annotations(r.sanitised_dependency().spec().if_block()->maybe_annotations()))
{
- case bk_weak:
- case bk_uninstall_blocked_after:
+ case dsar_blocker_weak:
+ case dsar_blocker_uninstall_blocked_after:
normal = false;
break;
- case bk_strong:
- case bk_manual:
- case bk_upgrade_blocked_before:
- case bk_uninstall_blocked_before:
+ case dsar_blocker_strong:
+ case dsar_blocker_manual:
+ case dsar_blocker_upgrade_blocked_before:
+ case dsar_blocker_uninstall_blocked_before:
break;
- case last_bk:
- break;
+ default:
+ throw InternalError(PALUDIS_HERE, "unexpected role");
}
NAGIndex from(make_named_values<NAGIndex>(