aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-05 19:10:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-05 19:10:59 +0000
commit68774f1b9220d85e1bd853b452b1a1a357a0b846 (patch)
treead202097d04566efcc3706dd39ce445e3d8e1a08
parent820006e57c2c25c13e8f0e16d40886b4ec2e6588 (diff)
downloadpaludis-68774f1b9220d85e1bd853b452b1a1a357a0b846.tar.gz
paludis-68774f1b9220d85e1bd853b452b1a1a357a0b846.tar.xz
Don't score installed-wrong-options specially
-rw-r--r--paludis/resolver/any_child_score.se2
-rw-r--r--paludis/resolver/decider.cc34
2 files changed, 3 insertions, 33 deletions
diff --git a/paludis/resolver/any_child_score.se b/paludis/resolver/any_child_score.se
index 5de0d69..d484519 100644
--- a/paludis/resolver/any_child_score.se
+++ b/paludis/resolver/any_child_score.se
@@ -9,11 +9,9 @@ make_enum_AnyChildScore()
key acs_worse_than_worst "Worse than the worst option"
key acs_avoid "Explicitly avoiding"
key acs_not_installable "Not installable"
- key acs_installable "Installable"
key acs_blocks_installed "Blocks a currently-installed package"
key acs_could_install "Could install"
key acs_will_be_installing "Will be installing"
- key acs_wrong_options_installed "Already installed, wrong options"
key acs_already_installed "Already installed"
key acs_vacuous_blocker "Blocker that doesn't match any installable packages"
key acs_prefer "Explicitly preferred"
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 528c8a5..5c95cde 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1367,19 +1367,6 @@ Decider::find_any_score(
return std::make_pair(acs_already_installed, operator_bias);
}
- /* next: already installed, except with the wrong options */
- static_assert(acs_wrong_options_installed < acs_already_installed, "acs order changed");
- if (! is_block && spec.additional_requirements_ptr())
- {
- Context sub_context("When working out whether it's acs_wrong_options_installed:");
-
- const std::shared_ptr<const PackageIDSequence> installed_ids((*_imp->env)[selection::BestVersionOnly(
- generator::Matches(spec, our_id, { mpo_ignore_additional_requirements }) |
- filter::InstalledAtRoot(_imp->env->system_root_key()->value()))]);
- if (! installed_ids->empty())
- return std::make_pair(acs_wrong_options_installed, operator_bias);
- }
-
/* various things only if we're not a block... */
if (! is_block)
{
@@ -1388,7 +1375,7 @@ Decider::find_any_score(
const std::shared_ptr<const Resolvents> resolvents(_get_resolvents_for(spec, reason).first);
/* next: will already be installing */
- static_assert(acs_will_be_installing < acs_wrong_options_installed, "acs order changed");
+ static_assert(acs_will_be_installing < acs_already_installed, "acs order changed");
for (Resolvents::ConstIterator r(resolvents->begin()), r_end(resolvents->end()) ;
r != r_end ; ++r)
{
@@ -1410,7 +1397,7 @@ Decider::find_any_score(
return std::make_pair(acs_will_be_installing, operator_bias);
}
- /* next: cou;d install */
+ /* next: could install */
static_assert(acs_could_install < acs_will_be_installing, "acs order changed");
for (Resolvents::ConstIterator r(resolvents->begin()), r_end(resolvents->end()) ;
r != r_end ; ++r)
@@ -1440,22 +1427,7 @@ Decider::find_any_score(
return std::make_pair(acs_blocks_installed, operator_bias);
}
- /* next: installable not masked */
- static_assert(acs_installable < acs_could_install, "acs order changed");
- if (! is_block)
- {
- Context sub_context("When working out whether it's acs_installable:");
-
- const std::shared_ptr<const PackageIDSequence> ids((*_imp->env)[selection::BestVersionOnly(
- generator::Matches(spec, our_id, { mpo_ignore_additional_requirements }) |
- filter::SupportsAction<InstallAction>() |
- filter::NotMasked()
- )]);
- if (! ids->empty())
- return std::make_pair(acs_installable, operator_bias);
- }
-
- static_assert(acs_not_installable < acs_installable, "acs order changed");
+ static_assert(acs_not_installable < acs_could_install, "acs order changed");
return std::make_pair(acs_not_installable, operator_bias);
}