aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/resolver')
-rw-r--r--paludis/resolver/decider.cc2
-rw-r--r--paludis/resolver/get_constraints_for_dependent_helper.cc2
-rw-r--r--paludis/resolver/get_constraints_for_purge_helper.cc2
-rw-r--r--paludis/resolver/orderer.cc18
-rw-r--r--paludis/resolver/package_or_block_dep_spec.cc6
-rw-r--r--paludis/resolver/resolver_TEST_blockers.cc2
-rw-r--r--paludis/resolver/resolver_TEST_continue_on_failure.cc2
-rw-r--r--paludis/resolver/resolver_TEST_purges.cc2
-rw-r--r--paludis/resolver/resolver_TEST_uninstalls.cc2
-rw-r--r--paludis/resolver/spec_rewriter.cc2
10 files changed, 27 insertions, 13 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 7c083c38c..a4d24a46e 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1033,7 +1033,7 @@ Decider::_make_constraint_for_preloading(
result->spec().if_block() = std::make_shared<BlockDepSpec>(
"!" + stringify(s),
s,
- result->spec().if_block()->strong());
+ result->spec().if_block()->block_kind());
}
return result;
diff --git a/paludis/resolver/get_constraints_for_dependent_helper.cc b/paludis/resolver/get_constraints_for_dependent_helper.cc
index 1309f6288..642699aea 100644
--- a/paludis/resolver/get_constraints_for_dependent_helper.cc
+++ b/paludis/resolver/get_constraints_for_dependent_helper.cc
@@ -95,7 +95,7 @@ GetConstraintsForDependentHelper::operator() (
n::destination_type() = dt_install_to_slash,
n::nothing_is_fine_too() = true,
n::reason() = reason,
- n::spec() = BlockDepSpec("!" + stringify(*spec), *spec, false),
+ n::spec() = BlockDepSpec("!" + stringify(*spec), *spec, bk_weak),
n::untaken() = false,
n::use_existing() = ue_if_possible
)));
diff --git a/paludis/resolver/get_constraints_for_purge_helper.cc b/paludis/resolver/get_constraints_for_purge_helper.cc
index 507290a25..625ae8887 100644
--- a/paludis/resolver/get_constraints_for_purge_helper.cc
+++ b/paludis/resolver/get_constraints_for_purge_helper.cc
@@ -86,7 +86,7 @@ GetConstraintsForPurgeHelper::operator() (
n::destination_type() = dt_install_to_slash,
n::nothing_is_fine_too() = true,
n::reason() = reason,
- n::spec() = BlockDepSpec("!" + stringify(spec), spec, false),
+ n::spec() = BlockDepSpec("!" + stringify(spec), spec, bk_weak),
n::untaken() = ! _imp->purge_specs.match_any(_imp->env, id, { }),
n::use_existing() = ue_if_possible
)));
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 5982901d1..ce753449e 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -260,8 +260,22 @@ namespace
{
bool normal(true);
if (r.sanitised_dependency().spec().if_block())
- if (! r.sanitised_dependency().spec().if_block()->strong())
- normal = false;
+ switch (r.sanitised_dependency().spec().if_block()->block_kind())
+ {
+ case bk_weak:
+ case bk_uninstall_blocked_after:
+ normal = false;
+ break;
+
+ case bk_strong:
+ case bk_manual:
+ case bk_upgrade_blocked_before:
+ case bk_uninstall_blocked_before:
+ break;
+
+ case last_bk:
+ break;
+ }
NAGIndex from(make_named_values<NAGIndex>(
n::resolvent() = r.from_resolvent(),
diff --git a/paludis/resolver/package_or_block_dep_spec.cc b/paludis/resolver/package_or_block_dep_spec.cc
index cb96300f3..576ec5755 100644
--- a/paludis/resolver/package_or_block_dep_spec.cc
+++ b/paludis/resolver/package_or_block_dep_spec.cc
@@ -66,7 +66,7 @@ PackageOrBlockDepSpec::serialise(Serialiser & s) const
w
.member(SerialiserFlags<>(), "block", true)
.member(SerialiserFlags<>(), "spec", stringify(if_block()->blocking()))
- .member(SerialiserFlags<>(), "strong", if_block()->strong())
+ .member(SerialiserFlags<>(), "block_kind", stringify(if_block()->block_kind()))
.member(SerialiserFlags<>(), "text", if_block()->text())
;
}
@@ -140,9 +140,9 @@ PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::shared_ptr<co
if (block)
{
- bool strong(v.member<bool>("strong"));
+ BlockKind kind(destringify<BlockKind>(v.member<std::string>("block_kind")));
std::string text(v.member<std::string>("text"));
- BlockDepSpec b_spec(text, spec, strong);
+ BlockDepSpec b_spec(text, spec, kind);
if (annotations)
b_spec.set_annotations_key(annotations);
return PackageOrBlockDepSpec(b_spec);
diff --git a/paludis/resolver/resolver_TEST_blockers.cc b/paludis/resolver/resolver_TEST_blockers.cc
index d6ea45832..3df4f44cd 100644
--- a/paludis/resolver/resolver_TEST_blockers.cc
+++ b/paludis/resolver/resolver_TEST_blockers.cc
@@ -189,7 +189,7 @@ namespace test_cases
std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
"!target/target",
parse_user_package_dep_spec("target/target", &env, { }),
- false)));
+ bk_weak)));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = exists ? make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_continue_on_failure.cc b/paludis/resolver/resolver_TEST_continue_on_failure.cc
index ab9e63f28..29da32865 100644
--- a/paludis/resolver/resolver_TEST_continue_on_failure.cc
+++ b/paludis/resolver/resolver_TEST_continue_on_failure.cc
@@ -169,7 +169,7 @@ namespace test_cases
std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
"!continue-on-failure-uninstall/target",
parse_user_package_dep_spec("continue-on-failure-uninstall/target", &env, { }),
- false)));
+ bk_weak)));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_purges.cc b/paludis/resolver/resolver_TEST_purges.cc
index be4a6fae0..7068f5b11 100644
--- a/paludis/resolver/resolver_TEST_purges.cc
+++ b/paludis/resolver/resolver_TEST_purges.cc
@@ -126,7 +126,7 @@ namespace test_cases
std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
"!star-slot-purges/target:1",
parse_user_package_dep_spec("star-slot-purges/target:1", &env, { }),
- false)));
+ bk_weak)));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_uninstalls.cc b/paludis/resolver/resolver_TEST_uninstalls.cc
index 46c9ff7b5..8369b4600 100644
--- a/paludis/resolver/resolver_TEST_uninstalls.cc
+++ b/paludis/resolver/resolver_TEST_uninstalls.cc
@@ -96,7 +96,7 @@ namespace test_cases
std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
"!breaking/target",
parse_user_package_dep_spec("breaking/target", &env, { }),
- false)));
+ bk_weak)));
if (allowed_to_remove)
check_resolved(resolved,
diff --git a/paludis/resolver/spec_rewriter.cc b/paludis/resolver/spec_rewriter.cc
index d9208423c..08f6aca9b 100644
--- a/paludis/resolver/spec_rewriter.cc
+++ b/paludis/resolver/spec_rewriter.cc
@@ -136,7 +136,7 @@ SpecRewriter::rewrite_if_special(const PackageOrBlockDepSpec & s, const std::sha
std::string::size_type p(prefix.find_first_not_of('!'));
if (std::string::npos != p)
prefix.erase(p);
- result->specs()->push_back(BlockDepSpec(prefix + stringify(spec), spec, s.if_block()->strong()));
+ result->specs()->push_back(BlockDepSpec(prefix + stringify(spec), spec, s.if_block()->block_kind()));
}
return result;