aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-11 22:19:18 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-12 01:26:02 +0100
commit50dfa914e9247cbdbd5fa814f3cf8c2bfab01503 (patch)
treedd4ca6d183eb27ba1b69ef795f27034ed8ef175f
parentd7a61b8159897493072273e0705eb5d0b7ae406b (diff)
downloadpaludis-50dfa914e9247cbdbd5fa814f3cf8c2bfab01503.tar.gz
paludis-50dfa914e9247cbdbd5fa814f3cf8c2bfab01503.tar.xz
Suggestions
-rw-r--r--paludis/resolver/constraint.cc13
-rw-r--r--paludis/resolver/constraint.hh3
-rw-r--r--paludis/resolver/decision.cc4
-rw-r--r--paludis/resolver/decision.hh2
-rw-r--r--paludis/resolver/resolutions.cc4
-rw-r--r--paludis/resolver/resolutions.hh2
-rw-r--r--paludis/resolver/resolver.cc61
-rw-r--r--paludis/resolver/resolver_functions.hh8
-rw-r--r--src/clients/cave/cmd_display_resolution.cc93
-rw-r--r--src/clients/cave/cmd_resolve.cc21
-rw-r--r--src/clients/cave/cmd_resolve_dump.cc1
11 files changed, 165 insertions, 47 deletions
diff --git a/paludis/resolver/constraint.cc b/paludis/resolver/constraint.cc
index 76bebf8..cf15f0d 100644
--- a/paludis/resolver/constraint.cc
+++ b/paludis/resolver/constraint.cc
@@ -38,12 +38,14 @@ namespace paludis
{
UseInstalled strictest_use_installed;
bool nothing_is_fine_too;
+ bool all_untaken;
DestinationTypes to_destinations;
Sequence<std::tr1::shared_ptr<const Constraint> > constraints;
Implementation() :
strictest_use_installed(ui_if_possible),
- nothing_is_fine_too(true)
+ nothing_is_fine_too(true),
+ all_untaken(true)
{
}
};
@@ -77,6 +79,7 @@ Constraints::add(const std::tr1::shared_ptr<const Constraint> & c)
_imp->strictest_use_installed = std::min(_imp->strictest_use_installed, c->use_installed());
_imp->nothing_is_fine_too = _imp->nothing_is_fine_too && c->nothing_is_fine_too();
_imp->to_destinations |= c->to_destinations();
+ _imp->all_untaken = _imp->all_untaken && c->untaken();
}
bool
@@ -97,6 +100,12 @@ Constraints::nothing_is_fine_too() const
return _imp->nothing_is_fine_too;
}
+bool
+Constraints::all_untaken() const
+{
+ return _imp->all_untaken;
+}
+
const DestinationTypes
Constraints::to_destinations() const
{
@@ -130,6 +139,7 @@ Constraint::serialise(Serialiser & s) const
.member(SerialiserFlags<serialise::might_be_null>(), "reason", reason())
.member(SerialiserFlags<>(), "spec", spec())
.member(SerialiserFlags<>(), "to_destinations", to_destinations())
+ .member(SerialiserFlags<>(), "untaken", stringify(untaken()))
.member(SerialiserFlags<>(), "use_installed", stringify(use_installed()))
;
}
@@ -176,6 +186,7 @@ Constraint::deserialise(Deserialisation & d)
value_for<n::spec>(PackageOrBlockDepSpec::deserialise(*v.find_remove_member("spec"),
reason->accept_returning<std::tr1::shared_ptr<const PackageID> >(id_finder))),
value_for<n::to_destinations>(v.member<DestinationTypes>("to_destinations")),
+ value_for<n::untaken>(v.member<bool>("untaken")),
value_for<n::use_installed>(destringify<UseInstalled>(v.member<std::string>("use_installed")))
)));
}
diff --git a/paludis/resolver/constraint.hh b/paludis/resolver/constraint.hh
index f244dd0..f7fe15e 100644
--- a/paludis/resolver/constraint.hh
+++ b/paludis/resolver/constraint.hh
@@ -39,6 +39,7 @@ namespace paludis
struct reason;
struct spec;
struct to_destinations;
+ struct untaken;
struct use_installed;
}
@@ -50,6 +51,7 @@ namespace paludis
NamedValue<n::reason, std::tr1::shared_ptr<const Reason> > reason;
NamedValue<n::spec, PackageOrBlockDepSpec> spec;
NamedValue<n::to_destinations, DestinationTypes> to_destinations;
+ NamedValue<n::untaken, bool> untaken;
NamedValue<n::use_installed, UseInstalled> use_installed;
void serialise(Serialiser &) const;
@@ -67,6 +69,7 @@ namespace paludis
UseInstalled strictest_use_installed() const PALUDIS_ATTRIBUTE((warn_unused_result));
bool nothing_is_fine_too() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ bool all_untaken() const PALUDIS_ATTRIBUTE((warn_unused_result));
const DestinationTypes to_destinations() const PALUDIS_ATTRIBUTE((warn_unused_result));
void add(const std::tr1::shared_ptr<const Constraint> &);
diff --git a/paludis/resolver/decision.cc b/paludis/resolver/decision.cc
index 6229080..bec3297 100644
--- a/paludis/resolver/decision.cc
+++ b/paludis/resolver/decision.cc
@@ -38,6 +38,7 @@ Decision::serialise(Serialiser & s) const
.member(SerialiserFlags<>(), "is_same_version", is_same_version())
.member(SerialiserFlags<>(), "is_transient", is_transient())
.member(SerialiserFlags<>(), "kind", stringify(kind()))
+ .member(SerialiserFlags<>(), "taken", stringify(taken()))
;
}
@@ -51,7 +52,8 @@ Decision::deserialise(Deserialisation & d)
value_for<n::is_same>(v.member<bool>("is_same")),
value_for<n::is_same_version>(v.member<bool>("is_same_version")),
value_for<n::is_transient>(v.member<bool>("is_transient")),
- value_for<n::kind>(destringify<DecisionKind>(v.member<std::string>("kind")))
+ value_for<n::kind>(destringify<DecisionKind>(v.member<std::string>("kind"))),
+ value_for<n::taken>(v.member<bool>("taken"))
)));
}
diff --git a/paludis/resolver/decision.hh b/paludis/resolver/decision.hh
index 056d458..a7687be 100644
--- a/paludis/resolver/decision.hh
+++ b/paludis/resolver/decision.hh
@@ -35,6 +35,7 @@ namespace paludis
struct is_same_version;
struct is_transient;
struct kind;
+ struct taken;
}
namespace resolver
@@ -47,6 +48,7 @@ namespace paludis
NamedValue<n::is_same_version, bool> is_same_version;
NamedValue<n::is_transient, bool> is_transient;
NamedValue<n::kind, DecisionKind> kind;
+ NamedValue<n::taken, bool> taken;
void serialise(Serialiser &) const;
diff --git a/paludis/resolver/resolutions.cc b/paludis/resolver/resolutions.cc
index aaf2938..80a8f63 100644
--- a/paludis/resolver/resolutions.cc
+++ b/paludis/resolver/resolutions.cc
@@ -97,6 +97,7 @@ ResolutionLists::serialise(Serialiser & s) const
.member(SerialiserFlags<serialise::might_be_null>(), "all", all())
.member(SerialiserFlags<serialise::might_be_null>(), "errors", errors())
.member(SerialiserFlags<serialise::might_be_null>(), "ordered", ordered())
+ .member(SerialiserFlags<serialise::might_be_null>(), "untaken", untaken())
;
}
@@ -107,7 +108,8 @@ ResolutionLists::deserialise(Deserialisation & d)
return make_named_values<ResolutionLists>(
value_for<n::all>(v.member<std::tr1::shared_ptr<Resolutions> >("all")),
value_for<n::errors>(v.member<std::tr1::shared_ptr<Resolutions> >("errors")),
- value_for<n::ordered>(v.member<std::tr1::shared_ptr<Resolutions> >("ordered"))
+ value_for<n::ordered>(v.member<std::tr1::shared_ptr<Resolutions> >("ordered")),
+ value_for<n::untaken>(v.member<std::tr1::shared_ptr<Resolutions> >("untaken"))
);
}
diff --git a/paludis/resolver/resolutions.hh b/paludis/resolver/resolutions.hh
index 695873f..6b2e447 100644
--- a/paludis/resolver/resolutions.hh
+++ b/paludis/resolver/resolutions.hh
@@ -35,6 +35,7 @@ namespace paludis
struct all;
struct errors;
struct ordered;
+ struct untaken;
}
namespace resolver
@@ -44,6 +45,7 @@ namespace paludis
NamedValue<n::all, std::tr1::shared_ptr<Resolutions> > all;
NamedValue<n::errors, std::tr1::shared_ptr<Resolutions> > errors;
NamedValue<n::ordered, std::tr1::shared_ptr<Resolutions> > ordered;
+ NamedValue<n::untaken, std::tr1::shared_ptr<Resolutions> > untaken;
void serialise(Serialiser &) const;
static ResolutionLists deserialise(
diff --git a/paludis/resolver/resolver.cc b/paludis/resolver/resolver.cc
index 8149ed2..55d157f 100644
--- a/paludis/resolver/resolver.cc
+++ b/paludis/resolver/resolver.cc
@@ -81,7 +81,8 @@ namespace paludis
resolution_lists(new ResolutionLists(make_named_values<ResolutionLists>(
value_for<n::all>(new Resolutions),
value_for<n::errors>(new Resolutions),
- value_for<n::ordered>(new Resolutions)
+ value_for<n::ordered>(new Resolutions),
+ value_for<n::untaken>(new Resolutions)
)))
{
}
@@ -141,7 +142,8 @@ Resolver::_resolve_dependencies()
continue;
}
- _add_dependencies(i->first, i->second);
+ if (i->second->decision()->taken())
+ _add_dependencies(i->first, i->second);
}
}
}
@@ -383,6 +385,7 @@ Resolver::_make_constraint_from_target(
value_for<n::reason>(reason),
value_for<n::spec>(spec),
value_for<n::to_destinations>(DestinationTypes() + dt_slash),
+ value_for<n::untaken>(false),
value_for<n::use_installed>(_imp->fns.get_use_installed_fn()(qpn_s, spec, reason))
)));
}
@@ -397,7 +400,10 @@ Resolver::_make_constraint_from_dependency(const QPN_S & qpn_s, const SanitisedD
value_for<n::reason>(reason),
value_for<n::spec>(*dep.spec().if_package()),
value_for<n::to_destinations>(_destination_types_for_dependency(qpn_s, dep)),
- value_for<n::use_installed>(_imp->fns.get_use_installed_fn()(qpn_s, *dep.spec().if_package(), reason))
+ value_for<n::untaken>(! _imp->fns.take_dependency_fn()(qpn_s, dep,
+ reason)),
+ value_for<n::use_installed>(_imp->fns.get_use_installed_fn()(qpn_s, *dep.spec().if_package(),
+ reason))
)));
else if (dep.spec().if_block())
{
@@ -411,6 +417,7 @@ Resolver::_make_constraint_from_dependency(const QPN_S & qpn_s, const SanitisedD
value_for<n::reason>(reason),
value_for<n::spec>(dep.spec()),
value_for<n::to_destinations>(DestinationTypes() + dt_slash),
+ value_for<n::untaken>(false),
value_for<n::use_installed>(ui_if_possible)
)));
}
@@ -539,6 +546,7 @@ Resolver::_make_constraint_for_preloading(
value_for<n::reason>(reason),
value_for<n::spec>(d->if_package_id()->uniquely_identifying_spec()),
value_for<n::to_destinations>(DestinationTypes()),
+ value_for<n::untaken>(false),
value_for<n::use_installed>(_imp->fns.get_use_installed_fn()(
qpn_s, d->if_package_id()->uniquely_identifying_spec(), reason))
)));
@@ -780,11 +788,21 @@ Resolver::_resolve_order()
case dk_unable_to_decide:
i->second->already_ordered() = true;
- _imp->resolution_lists->errors()->append(i->second);
+ if (i->second->decision()->taken())
+ _imp->resolution_lists->errors()->append(i->second);
+ else
+ _imp->resolution_lists->untaken()->append(i->second);
break;
- case last_dk:
case dk_installable:
+ if (! i->second->decision()->taken())
+ {
+ i->second->already_ordered() = true;
+ _imp->resolution_lists->untaken()->append(i->second);
+ }
+ break;
+
+ case last_dk:
break;
}
}
@@ -1187,7 +1205,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(false),
value_for<n::is_same_version>(false),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_nothing)
+ value_for<n::kind>(dk_nothing),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
}
else if (installable_id && ! installed_id)
@@ -1199,7 +1218,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(false),
value_for<n::is_same_version>(false),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_installable)
+ value_for<n::kind>(dk_installable),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
}
else if (installed_id && ! installable_id)
@@ -1232,7 +1252,9 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(true),
value_for<n::is_same_version>(true),
value_for<n::is_transient>(is_transient),
- value_for<n::kind>(dk_installed)
+ value_for<n::kind>(dk_installed),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
+
)));
}
else if ((! installed_id) && (! installable_id))
@@ -1307,7 +1329,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_installable)
+ value_for<n::kind>(dk_installable),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
case ui_if_same:
@@ -1318,7 +1341,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_installed)
+ value_for<n::kind>(dk_installed),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
else
return make_shared_ptr(new Decision(make_named_values<Decision>(
@@ -1327,7 +1351,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(is_transient),
- value_for<n::kind>(dk_installable)
+ value_for<n::kind>(dk_installable),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
case ui_if_same_version:
@@ -1338,7 +1363,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_installed)
+ value_for<n::kind>(dk_installed),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
else
return make_shared_ptr(new Decision(make_named_values<Decision>(
@@ -1347,7 +1373,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(is_transient),
- value_for<n::kind>(dk_installable)
+ value_for<n::kind>(dk_installable),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
case ui_if_possible:
@@ -1357,7 +1384,8 @@ Resolver::_try_to_find_decision_for(
value_for<n::is_same>(is_same),
value_for<n::is_same_version>(is_same_version),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_installed)
+ value_for<n::kind>(dk_installed),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
case last_ui:
@@ -1371,7 +1399,7 @@ Resolver::_try_to_find_decision_for(
const std::tr1::shared_ptr<Decision>
Resolver::_cannot_decide_for(
const QPN_S &,
- const std::tr1::shared_ptr<const Resolution> &) const
+ const std::tr1::shared_ptr<const Resolution> & resolution) const
{
return make_shared_ptr(new Decision(make_named_values<Decision>(
value_for<n::if_package_id>(make_null_shared_ptr()),
@@ -1379,7 +1407,8 @@ Resolver::_cannot_decide_for(
value_for<n::is_same>(false),
value_for<n::is_same_version>(false),
value_for<n::is_transient>(false),
- value_for<n::kind>(dk_unable_to_decide)
+ value_for<n::kind>(dk_unable_to_decide),
+ value_for<n::taken>(! resolution->constraints()->all_untaken())
)));
}
diff --git a/paludis/resolver/resolver_functions.hh b/paludis/resolver/resolver_functions.hh
index 177349f..cba7d19 100644
--- a/paludis/resolver/resolver_functions.hh
+++ b/paludis/resolver/resolver_functions.hh
@@ -36,6 +36,7 @@ namespace paludis
struct get_initial_constraints_for_fn;
struct get_qpn_s_s_for_fn;
struct get_use_installed_fn;
+ struct take_dependency_fn;
}
namespace resolver
@@ -55,6 +56,12 @@ namespace paludis
const std::tr1::shared_ptr<const Reason> &
)> GetQPNSSForFunction;
+ typedef std::tr1::function<bool (
+ const QPN_S &,
+ const SanitisedDependency &,
+ const std::tr1::shared_ptr<const Reason> &
+ )> TakeDependencyFunction;
+
typedef std::tr1::function<UseInstalled (
const QPN_S &,
const PackageDepSpec &,
@@ -67,6 +74,7 @@ namespace paludis
NamedValue<n::get_initial_constraints_for_fn, GetInitialConstraintsFunction> get_initial_constraints_for_fn;
NamedValue<n::get_qpn_s_s_for_fn, GetQPNSSForFunction> get_qpn_s_s_for_fn;
NamedValue<n::get_use_installed_fn, GetUseInstalledFunction> get_use_installed_fn;
+ NamedValue<n::take_dependency_fn, TakeDependencyFunction> take_dependency_fn;
};
}
}
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index cdb9835..1b29247 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -217,28 +217,40 @@ namespace
}
}
- void display_resolution(
- const std::tr1::shared_ptr<Environment> & env,
- const ResolutionLists & lists,
- const DisplayResolutionCommandLine &)
+ void display_one_error(
+ const std::tr1::shared_ptr<Environment> &,
+ const DisplayResolutionCommandLine &,
+ const std::tr1::shared_ptr<const Resolution> & resolution,
+ const bool verbose)
{
- Context context("When displaying chosen resolution:");
+ if (resolution->qpn_s().slot_name_or_null())
+ cout << "[?] " << c::bold_red() << resolution->qpn_s() << c::normal();
+ else
+ cout << "[?] " << c::bold_red() << resolution->qpn_s().package() << c::normal();
+ cout << " (no decision could be reached)" << endl;
- if (lists.ordered()->empty())
- {
- if (lists.errors()->empty())
- cout << "There are no actions to carry out" << endl << endl;
- return;
- }
-
- cout << "These are the actions I will take, in order:" << endl << endl;
+ display_reasons(resolution, verbose);
+ }
- for (Resolutions::ConstIterator c(lists.ordered()->begin()), c_end(lists.ordered()->end()) ;
+ void display_resolution_list(
+ const std::tr1::shared_ptr<Environment> & env,
+ const std::tr1::shared_ptr<const Resolutions> & list,
+ const DisplayResolutionCommandLine & cmdline)
+ {
+ for (Resolutions::ConstIterator c(list->begin()), c_end(list->end()) ;
c != c_end ; ++c)
{
const std::tr1::shared_ptr<const PackageID> id((*c)->decision()->if_package_id());
if (! id)
- throw InternalError(PALUDIS_HERE, "why did that happen?");
+ {
+ if ((*c)->decision()->kind() == dk_unable_to_decide)
+ {
+ display_one_error(env, cmdline, *c, false);
+ continue;
+ }
+ else
+ throw InternalError(PALUDIS_HERE, "why did that happen?");
+ }
bool is_new(false), is_upgrade(false), is_downgrade(false), is_reinstall(false),
other_slots(false);
@@ -274,7 +286,11 @@ namespace
is_reinstall = is_reinstall && (! is_downgrade);
}
- if (is_new)
+ if (! (*c)->decision()->taken())
+ {
+ cout << "[-] " << c::blue() << id->canonical_form(idcf_no_version);
+ }
+ else if (is_new)
{
if (other_slots)
cout << "[s] " << c::bold_blue() << id->canonical_form(idcf_no_version);
@@ -444,10 +460,42 @@ namespace
cout << endl;
}
+ void display_resolution(
+ const std::tr1::shared_ptr<Environment> & env,
+ const ResolutionLists & lists,
+ const DisplayResolutionCommandLine & cmdline)
+ {
+ Context context("When displaying chosen resolution:");
+
+ if (lists.ordered()->empty())
+ {
+ if (lists.errors()->empty())
+ cout << "There are no actions to carry out" << endl << endl;
+ return;
+ }
+
+ cout << "These are the actions I will take, in order:" << endl << endl;
+ display_resolution_list(env, lists.ordered(), cmdline);
+ }
+
+ void display_untaken(
+ const std::tr1::shared_ptr<Environment> & env,
+ const ResolutionLists & lists,
+ const DisplayResolutionCommandLine & cmdline)
+ {
+ Context context("When displaying untaken resolutions:");
+
+ if (lists.untaken()->empty())
+ return;
+
+ cout << "I didn't take the following suggestions:" << endl << endl;
+ display_resolution_list(env, lists.untaken(), cmdline);
+ }
+
void display_errors(
- const std::tr1::shared_ptr<Environment> &,
+ const std::tr1::shared_ptr<Environment> & env,
const ResolutionLists & lists,
- const DisplayResolutionCommandLine &)
+ const DisplayResolutionCommandLine & cmdline)
{
Context context("When displaying errors for chosen resolution:");
@@ -462,13 +510,7 @@ namespace
if ((*c)->decision()->kind() != dk_unable_to_decide)
continue;
- if ((*c)->qpn_s().slot_name_or_null())
- cout << "[?] " << c::bold_red() << (*c)->qpn_s() << c::normal();
- else
- cout << "[?] " << c::bold_red() << (*c)->qpn_s().package() << c::normal();
- cout << " (no decision could be reached)" << endl;
-
- display_reasons(*c, true);
+ display_one_error(env, cmdline, *c, true);
}
cout << endl;
@@ -642,6 +684,7 @@ DisplayResolutionCommand::run(
ResolutionLists lists(ResolutionLists::deserialise(deserialisation));
display_resolution(env, lists, cmdline);
+ display_untaken(env, lists, cmdline);
display_errors(env, lists, cmdline);
display_explanations(env, lists, cmdline);
diff --git a/src/clients/cave/cmd_resolve.cc b/src/clients/cave/cmd_resolve.cc
index 40c0c7f..f2e3917 100644
--- a/src/clients/cave/cmd_resolve.cc
+++ b/src/clients/cave/cmd_resolve.cc
@@ -257,6 +257,7 @@ namespace
value_for<n::reason>(make_shared_ptr(new PresetReason)),
value_for<n::spec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(qpn_s.package())),
value_for<n::to_destinations>(DestinationTypes()),
+ value_for<n::untaken>(false),
value_for<n::use_installed>(ui_only_if_transient)
))));
}
@@ -464,9 +465,6 @@ namespace
const QPN_S &, const std::tr1::shared_ptr<const Resolution> & resolution,
const SanitisedDependency & dep)
{
- if (is_suggestion(dep))
- return false;
-
if (dk_installed == resolution->decision()->kind())
{
if (! cmdline.resolution_options.a_follow_installed_build_dependencies.specified())
@@ -480,6 +478,20 @@ namespace
return true;
}
+ bool
+ take_dependency_fn(const Environment * const env,
+ const ResolveCommandLine & cmdline,
+ const QPN_S &,
+ const SanitisedDependency & dep,
+ const std::tr1::shared_ptr<const Reason> & reason)
+ {
+ if (is_suggestion(dep))
+ return false;
+
+ return true;
+ }
+
+
int display_resolution(
const std::tr1::shared_ptr<Environment> &,
const ResolutionLists & resolution_lists,
@@ -649,7 +661,10 @@ ResolveCommand::run(
value_for<n::get_qpn_s_s_for_fn>(std::tr1::bind(&get_qpn_s_s_for_fn,
env.get(), std::tr1::cref(cmdline), std::tr1::placeholders::_1, std::tr1::placeholders::_2)),
value_for<n::get_use_installed_fn>(std::tr1::bind(&use_installed_fn,
+ std::tr1::cref(cmdline), std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3)),
+ value_for<n::take_dependency_fn>(std::tr1::bind(&take_dependency_fn, env.get(),
std::tr1::cref(cmdline), std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3))
+
));
std::tr1::shared_ptr<Resolver> resolver(new Resolver(env.get(), resolver_functions));
try
diff --git a/src/clients/cave/cmd_resolve_dump.cc b/src/clients/cave/cmd_resolve_dump.cc
index 7dca922..eea19e9 100644
--- a/src/clients/cave/cmd_resolve_dump.cc
+++ b/src/clients/cave/cmd_resolve_dump.cc
@@ -165,6 +165,7 @@ namespace
if (c.nothing_is_fine_too())
ss << "; nothing is fine too";
ss
+ << "; untaken: " << stringify(c.untaken())
<< "; use_installed: " << stringify(c.use_installed())
<< "; reason: ";