aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-07 00:09:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-07 00:09:25 +0000
commit4ae42b46615a01e39566ce54deb2c76dacd1e32d (patch)
treeb735629cde77d8f79b0bfb5f21a338cff66a5d2d
parentc311f98874ed2684f2ef63866942386b576b5bd9 (diff)
downloadpaludis-4ae42b46615a01e39566ce54deb2c76dacd1e32d.tar.gz
paludis-4ae42b46615a01e39566ce54deb2c76dacd1e32d.tar.xz
kill more sr. with fire.
-rw-r--r--paludis/args/dep_list_args_group.cc96
-rw-r--r--paludis/args/install_args_group.cc2
-rw-r--r--paludis/dep_list.cc173
-rw-r--r--paludis/dep_list.hh57
-rw-r--r--paludis/dep_list.sr51
-rw-r--r--paludis/dep_list_TEST.cc26
-rw-r--r--paludis/dep_list_TEST_blockers.cc18
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/install_task.cc62
-rw-r--r--paludis/query_visitor.cc2
-rw-r--r--paludis/show_suggest_visitor.cc4
-rw-r--r--python/dep_list.cc78
-rw-r--r--ruby/dep_list.cc139
-rw-r--r--src/clients/adjutrix/display_default_system_resolution.cc4
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc16
15 files changed, 383 insertions, 347 deletions
diff --git a/paludis/args/dep_list_args_group.cc b/paludis/args/dep_list_args_group.cc
index 7192369..38fa1e1 100644
--- a/paludis/args/dep_list_args_group.cc
+++ b/paludis/args/dep_list_args_group.cc
@@ -163,96 +163,96 @@ DepListArgsGroup::populate_dep_list_options(const Environment * env, DepListOpti
using namespace std::tr1::placeholders;
if (dl_reinstall.argument() == "never")
- options.reinstall = dl_reinstall_never;
+ options.reinstall() = dl_reinstall_never;
else if (dl_reinstall.argument() == "always")
- options.reinstall = dl_reinstall_always;
+ options.reinstall() = dl_reinstall_always;
else if (dl_reinstall.argument() == "if-use-changed")
- options.reinstall = dl_reinstall_if_use_changed;
+ options.reinstall() = dl_reinstall_if_use_changed;
else
throw args::DoHelp("bad value for --dl-reinstall");
if (dl_reinstall_scm.argument() == "never")
- options.reinstall_scm = dl_reinstall_scm_never;
+ options.reinstall_scm() = dl_reinstall_scm_never;
else if (dl_reinstall_scm.argument() == "always")
- options.reinstall_scm = dl_reinstall_scm_always;
+ options.reinstall_scm() = dl_reinstall_scm_always;
else if (dl_reinstall_scm.argument() == "daily")
- options.reinstall_scm = dl_reinstall_scm_daily;
+ options.reinstall_scm() = dl_reinstall_scm_daily;
else if (dl_reinstall_scm.argument() == "weekly")
- options.reinstall_scm = dl_reinstall_scm_weekly;
+ options.reinstall_scm() = dl_reinstall_scm_weekly;
else
throw args::DoHelp("bad value for --dl-reinstall-scm");
if (dl_upgrade.argument() == "as-needed")
- options.upgrade = dl_upgrade_as_needed;
+ options.upgrade() = dl_upgrade_as_needed;
else if (dl_upgrade.argument() == "always")
- options.upgrade = dl_upgrade_always;
+ options.upgrade() = dl_upgrade_always;
else
throw args::DoHelp("bad value for --dl-upgrade");
if (dl_new_slots.argument() == "as-needed")
- options.new_slots = dl_new_slots_as_needed;
+ options.new_slots() = dl_new_slots_as_needed;
else if (dl_new_slots.argument() == "always")
- options.new_slots = dl_new_slots_always;
+ options.new_slots() = dl_new_slots_always;
else
throw args::DoHelp("bad value for --dl-new-slots");
if (dl_downgrade.argument() == "as-needed")
- options.downgrade = dl_downgrade_as_needed;
+ options.downgrade() = dl_downgrade_as_needed;
else if (dl_downgrade.argument() == "warning")
- options.downgrade = dl_downgrade_warning;
+ options.downgrade() = dl_downgrade_warning;
else if (dl_downgrade.argument() == "error")
- options.downgrade = dl_downgrade_error;
+ options.downgrade() = dl_downgrade_error;
else
throw args::DoHelp("bad value for --dl-downgrade");
if (dl_circular.argument() == "discard")
- options.circular = dl_circular_discard;
+ options.circular() = dl_circular_discard;
else if (dl_circular.argument() == "error")
- options.circular = dl_circular_error;
+ options.circular() = dl_circular_error;
else
throw args::DoHelp("bad value for --dl-circular");
if (dl_suggested.argument() == "show")
- options.suggested = dl_suggested_show;
+ options.suggested() = dl_suggested_show;
else if (dl_suggested.argument() == "discard")
- options.suggested = dl_suggested_discard;
+ options.suggested() = dl_suggested_discard;
else if (dl_suggested.argument() == "install")
- options.suggested = dl_suggested_install;
+ options.suggested() = dl_suggested_install;
else
throw args::DoHelp("bad value for --dl-suggested");
if (dl_blocks.argument() == "discard")
- options.blocks = dl_blocks_discard;
+ options.blocks() = dl_blocks_discard;
else if (dl_blocks.argument() == "error")
- options.blocks = dl_blocks_error;
+ options.blocks() = dl_blocks_error;
else if (dl_blocks.argument() == "accumulate")
- options.blocks = dl_blocks_accumulate;
+ options.blocks() = dl_blocks_accumulate;
else
throw args::DoHelp("bad value for --dl-blocks");
- if (! options.override_masks)
- options.override_masks.reset(new DepListOverrideMasksFunctions);
- options.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, env, _1, _2));
- options.override_masks->push_back(std::tr1::bind(&override_license, _2));
+ if (! options.override_masks())
+ options.override_masks().reset(new DepListOverrideMasksFunctions);
+ options.override_masks()->push_back(std::tr1::bind(&override_tilde_keywords, env, _1, _2));
+ options.override_masks()->push_back(std::tr1::bind(&override_license, _2));
if (dl_override_masks.specified())
{
for (args::StringSetArg::ConstIterator a(dl_override_masks.begin_args()),
a_end(dl_override_masks.end_args()) ; a != a_end ; ++a)
if (*a == "none")
- options.override_masks.reset(new DepListOverrideMasksFunctions);
+ options.override_masks().reset(new DepListOverrideMasksFunctions);
for (args::StringSetArg::ConstIterator a(dl_override_masks.begin_args()),
a_end(dl_override_masks.end_args()) ; a != a_end ; ++a)
{
if (*a == "tilde-keyword")
- options.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, env, _1, _2));
+ options.override_masks()->push_back(std::tr1::bind(&override_tilde_keywords, env, _1, _2));
else if (*a == "unkeyworded")
- options.override_masks->push_back(std::tr1::bind(&override_unkeyworded, env, _1, _2));
+ options.override_masks()->push_back(std::tr1::bind(&override_unkeyworded, env, _1, _2));
else if (*a == "repository")
- options.override_masks->push_back(std::tr1::bind(&override_repository_masks, _2));
+ options.override_masks()->push_back(std::tr1::bind(&override_repository_masks, _2));
else if (*a == "license")
- options.override_masks->push_back(std::tr1::bind(&override_license, _2));
+ options.override_masks()->push_back(std::tr1::bind(&override_license, _2));
else if (*a == "none")
{
}
@@ -262,41 +262,41 @@ DepListArgsGroup::populate_dep_list_options(const Environment * env, DepListOpti
}
if (dl_fall_back.argument() == "as-needed-except-targets")
- options.fall_back = dl_fall_back_as_needed_except_targets;
+ options.fall_back() = dl_fall_back_as_needed_except_targets;
else if (dl_fall_back.argument() == "as-needed")
- options.fall_back = dl_fall_back_as_needed;
+ options.fall_back() = dl_fall_back_as_needed;
else if (dl_fall_back.argument() == "never")
- options.fall_back = dl_fall_back_never;
+ options.fall_back() = dl_fall_back_never;
else
throw args::DoHelp("bad value for --dl-fall-back");
if (dl_deps_default.specified())
{
DepListDepsOption x(dl_deps_default.option());
- options.installed_deps_pre = x;
- options.installed_deps_post = x;
- options.installed_deps_runtime = x;
- options.uninstalled_deps_pre = x;
- options.uninstalled_deps_post = x;
- options.uninstalled_deps_runtime = x;
- options.uninstalled_deps_suggested = x;
+ options.installed_deps_pre() = x;
+ options.installed_deps_post() = x;
+ options.installed_deps_runtime() = x;
+ options.uninstalled_deps_pre() = x;
+ options.uninstalled_deps_post() = x;
+ options.uninstalled_deps_runtime() = x;
+ options.uninstalled_deps_suggested() = x;
}
if (dl_installed_deps_pre.specified() || ! dl_deps_default.specified())
- options.installed_deps_pre = enum_arg_to_dep_list_deps_option(dl_installed_deps_pre);
+ options.installed_deps_pre() = enum_arg_to_dep_list_deps_option(dl_installed_deps_pre);
if (dl_installed_deps_runtime.specified() || ! dl_deps_default.specified())
- options.installed_deps_runtime = enum_arg_to_dep_list_deps_option(dl_installed_deps_runtime);
+ options.installed_deps_runtime() = enum_arg_to_dep_list_deps_option(dl_installed_deps_runtime);
if (dl_installed_deps_post.specified() || ! dl_deps_default.specified())
- options.installed_deps_post = enum_arg_to_dep_list_deps_option(dl_installed_deps_post);
+ options.installed_deps_post() = enum_arg_to_dep_list_deps_option(dl_installed_deps_post);
if (dl_uninstalled_deps_pre.specified() || ! dl_deps_default.specified())
- options.uninstalled_deps_pre = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_pre);
+ options.uninstalled_deps_pre() = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_pre);
if (dl_uninstalled_deps_runtime.specified() || ! dl_deps_default.specified())
- options.uninstalled_deps_runtime = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_runtime);
+ options.uninstalled_deps_runtime() = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_runtime);
if (dl_uninstalled_deps_post.specified() || ! dl_deps_default.specified())
- options.uninstalled_deps_post = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_post);
+ options.uninstalled_deps_post() = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_post);
if (dl_uninstalled_deps_suggested.specified() || ! dl_deps_default.specified())
- options.uninstalled_deps_suggested = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_suggested);
+ options.uninstalled_deps_suggested() = enum_arg_to_dep_list_deps_option(dl_uninstalled_deps_suggested);
}
void
diff --git a/paludis/args/install_args_group.cc b/paludis/args/install_args_group.cc
index 2acc4a8..b5730cc 100644
--- a/paludis/args/install_args_group.cc
+++ b/paludis/args/install_args_group.cc
@@ -76,7 +76,7 @@ InstallArgsGroup::~InstallArgsGroup()
void
InstallArgsGroup::populate_dep_list_options(const Environment *, DepListOptions & options) const
{
- options.dependency_tags = a_show_reasons.argument() == "summary" || a_show_reasons.argument() == "full";
+ options.dependency_tags() = a_show_reasons.argument() == "summary" || a_show_reasons.argument() == "full";
}
std::tr1::shared_ptr<const DestinationsSet>
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index e03b486..c0a27e1 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -74,29 +74,28 @@ template class WrappedForwardIterator<DepList::ConstIteratorTag, const DepListEn
template class PrivateImplementationPattern<DepList>;
-#include <paludis/dep_list-sr.cc>
-
DepListOptions::DepListOptions() :
- reinstall(dl_reinstall_never),
- reinstall_scm(dl_reinstall_scm_never),
- target_type(dl_target_package),
- upgrade(dl_upgrade_always),
+ blocks(dl_blocks_accumulate),
+ circular(dl_circular_error),
+ dependency_tags(false),
downgrade(dl_downgrade_as_needed),
- new_slots(dl_new_slots_always),
fall_back(dl_fall_back_as_needed_except_targets),
+ installed_deps_post(dl_deps_try_post),
installed_deps_pre(dl_deps_discard),
installed_deps_runtime(dl_deps_try_post),
- installed_deps_post(dl_deps_try_post),
+ match_package_options(MatchPackageOptions()),
+ new_slots(dl_new_slots_always),
+ override_masks(make_null_shared_ptr()),
+ reinstall(dl_reinstall_never),
+ reinstall_scm(dl_reinstall_scm_never),
+ suggested(dl_suggested_show),
+ target_type(dl_target_package),
+ uninstalled_deps_post(dl_deps_post),
uninstalled_deps_pre(dl_deps_pre),
uninstalled_deps_runtime(dl_deps_pre_or_post),
- uninstalled_deps_post(dl_deps_post),
uninstalled_deps_suggested(dl_deps_try_post),
- suggested(dl_suggested_show),
- circular(dl_circular_error),
- use(dl_use_deps_standard),
- blocks(dl_blocks_accumulate),
- dependency_tags(false),
- match_package_options()
+ upgrade(dl_upgrade_always),
+ use(dl_use_deps_standard)
{
/* when changing the above, also see src/paludis/command_line.cc. */
}
@@ -139,7 +138,7 @@ namespace paludis
merge_list_insert_position(merge_list.end()),
merge_list_generation(0),
current_top_level_target(0),
- throw_on_blocker(o.blocks == dl_blocks_error)
+ throw_on_blocker(o.blocks() == dl_blocks_error)
{
labels.push_front(make_shared_ptr(new ActiveDependencyLabels(*make_shared_ptr(new DependencyLabelSequence))));
}
@@ -387,12 +386,12 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
}
Save<std::tr1::shared_ptr<ConstTreeSequence<DependencySpecTree, AllDepSpec> > > save_c(
- &conditions, d->_imp->opts->dependency_tags ? ConditionTracker(conditions).add_condition(a) : conditions);
+ &conditions, d->_imp->opts->dependency_tags() ? ConditionTracker(conditions).add_condition(a) : conditions);
/* find already installed things */
// TODO: check destinations
std::tr1::shared_ptr<const PackageIDSequence> already_installed((*d->_imp->env)[selection::AllVersionsSorted(
- generator::Matches(a, d->_imp->opts->match_package_options) | filter::SupportsAction<InstalledAction>())]);
+ generator::Matches(a, d->_imp->opts->match_package_options()) | filter::SupportsAction<InstalledAction>())]);
/* are we already on the merge list? */
std::pair<MergeListIndex::iterator, MergeListIndex::iterator> q;
@@ -402,7 +401,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
q = std::make_pair(d->_imp->merge_list_index.begin(), d->_imp->merge_list_index.end());
MergeListIndex::iterator qq(std::find_if(q.first, q.second,
- MatchDepListEntryAgainstPackageDepSpec(d->_imp->env, a, d->_imp->opts->match_package_options)));
+ MatchDepListEntryAgainstPackageDepSpec(d->_imp->env, a, d->_imp->opts->match_package_options())));
MergeList::iterator existing_merge_list_entry(qq == q.second ? d->_imp->merge_list.end() : qq->second);
if (existing_merge_list_entry != d->_imp->merge_list.end())
@@ -414,7 +413,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
value_for<n::tag>(a.tag())
));
- if (d->_imp->opts->dependency_tags && d->_imp->current_package_id())
+ if (d->_imp->opts->dependency_tags() && d->_imp->current_package_id())
existing_merge_list_entry->tags()->insert(make_named_values<DepTagEntry>(
value_for<n::generation>(d->_imp->merge_list_generation),
value_for<n::tag>(std::tr1::shared_ptr<DepTag>(new DependencyDepTag(d->_imp->current_package_id(), a, conditions)))
@@ -430,13 +429,13 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
if (! already_installed->empty())
return;
- if (d->_imp->opts->circular == dl_circular_discard)
+ if (d->_imp->opts->circular() == dl_circular_discard)
{
Log::get_instance()->message("dep_list.dropping_circular", ll_qa, lc_context)
<< "Dropping circular dependency on '" << *existing_merge_list_entry->package_id() << "'";
return;
}
- else if (d->_imp->opts->circular == dl_circular_discard_silently)
+ else if (d->_imp->opts->circular() == dl_circular_discard_silently)
return;
throw CircularDependencyError("Atom '" + stringify(a) + "' matched by merge list entry '" +
@@ -450,7 +449,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
/* find installable candidates, and find the best visible candidate */
std::tr1::shared_ptr<const PackageID> best_visible_candidate;
std::tr1::shared_ptr<const PackageIDSequence> installable_candidates(
- (*d->_imp->env)[selection::AllVersionsSorted(generator::Matches(a, d->_imp->opts->match_package_options) &
+ (*d->_imp->env)[selection::AllVersionsSorted(generator::Matches(a, d->_imp->opts->match_package_options()) &
generator::SomeIDsMightSupportAction<InstallAction>())]);
for (PackageIDSequence::ReverseConstIterator p(installable_candidates->rbegin()),
@@ -463,7 +462,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
if (! best_visible_candidate && ! already_installed->empty() &&
(*already_installed->last())->transient_key() && (*already_installed->last())->transient_key()->value() &&
- (dl_target_package != d->_imp->opts->target_type || ! d->is_top_level_target(**already_installed->last())))
+ (dl_target_package != d->_imp->opts->target_type() || ! d->is_top_level_target(**already_installed->last())))
{
Log::get_instance()->message("dep_list.no_visible.transient", ll_debug, lc_context) << "No visible packages matching '"
<< a << "', silently falling back to installed package '" << **already_installed->last() << "' as it is transient";
@@ -472,10 +471,10 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
}
/* are we allowed to override mask reasons? */
- if (! best_visible_candidate && d->_imp->opts->override_masks)
+ if (! best_visible_candidate && d->_imp->opts->override_masks())
{
- for (DepListOverrideMasksFunctions::ConstIterator of(d->_imp->opts->override_masks->begin()),
- of_end(d->_imp->opts->override_masks->end()) ; of != of_end ; ++of)
+ for (DepListOverrideMasksFunctions::ConstIterator of(d->_imp->opts->override_masks()->begin()),
+ of_end(d->_imp->opts->override_masks()->end()) ; of != of_end ; ++of)
{
if (best_visible_candidate)
break;
@@ -491,7 +490,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
m != m_end ; ++m)
{
bool local_success(false);
- for (DepListOverrideMasksFunctions::ConstIterator o(d->_imp->opts->override_masks->begin()),
+ for (DepListOverrideMasksFunctions::ConstIterator o(d->_imp->opts->override_masks()->begin()),
o_end(next(of)) ; o != o_end ; ++o)
if ((*o)(**p, **m))
local_success = true;
@@ -517,7 +516,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
bool can_fall_back;
do
{
- switch (d->_imp->opts->fall_back)
+ switch (d->_imp->opts->fall_back())
{
case dl_fall_back_never:
can_fall_back = false;
@@ -541,7 +540,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
;
}
- throw InternalError(PALUDIS_HERE, "Bad fall_back value '" + stringify(d->_imp->opts->fall_back) + "'");
+ throw InternalError(PALUDIS_HERE, "Bad fall_back value '" + stringify(d->_imp->opts->fall_back()) + "'");
} while (false);
if (already_installed->empty() || ! can_fall_back)
@@ -550,7 +549,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
throw AllMaskedError(a);
std::tr1::shared_ptr<const PackageIDSequence> match_except_reqs((*d->_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(*a.without_additional_requirements(), d->_imp->opts->match_package_options))]);
+ generator::Matches(*a.without_additional_requirements(), d->_imp->opts->match_package_options()))]);
for (PackageIDSequence::ConstIterator i(match_except_reqs->begin()),
i_end(match_except_reqs->end()) ; i != i_end ; ++i)
@@ -592,7 +591,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
<< "Not taking installed package '" << **already_installed_in_same_slot->last() << "' over '"
<< *best_visible_candidate << "'";
}
- else if ((! already_installed->empty()) && (dl_new_slots_as_needed == d->_imp->opts->new_slots))
+ else if ((! already_installed->empty()) && (dl_new_slots_as_needed == d->_imp->opts->new_slots()))
{
/* we have an already installed, but not in the same slot, and our options
* allow us to take this. */
@@ -615,7 +614,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
<< *best_visible_candidate << "'";
/* if this is a downgrade, make sure that that's ok */
- switch (d->_imp->opts->downgrade)
+ switch (d->_imp->opts->downgrade())
{
case dl_downgrade_as_needed:
break;
@@ -628,7 +627,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
generator::Matches(make_package_dep_spec()
.package(best_visible_candidate->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(best_visible_candidate->slot()))),
- d->_imp->opts->match_package_options) |
+ d->_imp->opts->match_package_options()) |
filter::SupportsAction<InstalledAction>())]);
if (are_we_downgrading->empty())
@@ -637,7 +636,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
if ((*are_we_downgrading->last())->version() <= best_visible_candidate->version())
break;
- if (d->_imp->opts->downgrade == dl_downgrade_error)
+ if (d->_imp->opts->downgrade() == dl_downgrade_error)
throw DowngradeNotAllowedError(stringify(*best_visible_candidate),
stringify(**are_we_downgrading->last()));
@@ -691,9 +690,9 @@ DepList::AddVisitor::visit_sequence(const ConditionalDepSpec & a,
DependencySpecTree::ConstSequenceIterator end)
{
Save<std::tr1::shared_ptr<ConstTreeSequence<DependencySpecTree, AllDepSpec> > > save_c(
- &conditions, d->_imp->opts->dependency_tags ? ConditionTracker(conditions).add_condition(a) : conditions);
+ &conditions, d->_imp->opts->dependency_tags() ? ConditionTracker(conditions).add_condition(a) : conditions);
- if (d->_imp->opts->use == dl_use_deps_standard)
+ if (d->_imp->opts->use() == dl_use_deps_standard)
{
d->_imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**d->_imp->labels.begin())));
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &d->_imp->labels));
@@ -735,7 +734,7 @@ DepList::AddVisitor::visit_sequence(const AnyDepSpec & a,
}
Save<std::tr1::shared_ptr<ConstTreeSequence<DependencySpecTree, AllDepSpec> > > save_c(
- &conditions, d->_imp->opts->dependency_tags ? ConditionTracker(conditions).add_condition(a) : conditions);
+ &conditions, d->_imp->opts->dependency_tags() ? ConditionTracker(conditions).add_condition(a) : conditions);
/* see if any of our children is already installed. if any is, add it so that
* any upgrades kick in */
@@ -766,8 +765,8 @@ DepList::AddVisitor::visit_sequence(const AnyDepSpec & a,
Context context("When using already installed package to resolve dependencies:");
Save<bool> save_t(&d->_imp->throw_on_blocker,
- dl_blocks_discard_completely != d->_imp->opts->blocks);
- Save<std::tr1::shared_ptr<DepListOverrideMasksFunctions> > save_o(&d->_imp->opts->override_masks,
+ dl_blocks_discard_completely != d->_imp->opts->blocks());
+ Save<std::tr1::shared_ptr<DepListOverrideMasksFunctions> > save_o(&d->_imp->opts->override_masks(),
std::tr1::shared_ptr<DepListOverrideMasksFunctions>());
d->add_not_top_level(only_if_not_suggested_label, *c, destinations, conditions);
return;
@@ -788,8 +787,8 @@ DepList::AddVisitor::visit_sequence(const AnyDepSpec & a,
Context context("When using new group to resolve dependencies:");
Save<bool> save_t(&d->_imp->throw_on_blocker,
- dl_blocks_discard_completely != d->_imp->opts->blocks);
- Save<std::tr1::shared_ptr<DepListOverrideMasksFunctions> > save_o(&d->_imp->opts->override_masks,
+ dl_blocks_discard_completely != d->_imp->opts->blocks());
+ Save<std::tr1::shared_ptr<DepListOverrideMasksFunctions> > save_o(&d->_imp->opts->override_masks(),
std::tr1::shared_ptr<DepListOverrideMasksFunctions>());
d->add_not_top_level(only_if_not_suggested_label, *c, destinations, conditions);
return;
@@ -817,7 +816,7 @@ DepList::AddVisitor::visit_sequence(const AnyDepSpec & a,
void
DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
{
- if (dl_blocks_discard_completely == d->_imp->opts->blocks)
+ if (dl_blocks_discard_completely == d->_imp->opts->blocks())
return;
// TODO: check destinations
@@ -825,7 +824,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
Context context("When checking BlockDepSpec '" + stringify(a) + "':");
Save<std::tr1::shared_ptr<ConstTreeSequence<DependencySpecTree, AllDepSpec> > > save_c(
- &conditions, d->_imp->opts->dependency_tags ? ConditionTracker(conditions).add_condition(a) : conditions);
+ &conditions, d->_imp->opts->dependency_tags() ? ConditionTracker(conditions).add_condition(a) : conditions);
bool check_whole_list(false);
std::list<MergeList::const_iterator> will_be_installed;
@@ -835,10 +834,10 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
{
PackageDepSpec just_package(make_package_dep_spec().package(*a.blocked_spec()->package_ptr()));
already_installed = (*d->_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(just_package, d->_imp->opts->match_package_options) |
+ generator::Matches(just_package, d->_imp->opts->match_package_options()) |
filter::SupportsAction<InstalledAction>())];
- MatchDepListEntryAgainstPackageDepSpec m(d->_imp->env, just_package, d->_imp->opts->match_package_options);
+ MatchDepListEntryAgainstPackageDepSpec m(d->_imp->env, just_package, d->_imp->opts->match_package_options());
for (std::pair<MergeListIndex::const_iterator, MergeListIndex::const_iterator> p(
d->_imp->merge_list_index.equal_range(*a.blocked_spec()->package_ptr())) ;
p.first != p.second ; ++p.first)
@@ -870,7 +869,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (PackageIDSequence::ConstIterator aa(already_installed->begin()),
aa_end(already_installed->end()) ; aa != aa_end ; ++aa)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), **aa, d->_imp->opts->match_package_options))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), **aa, d->_imp->opts->match_package_options()))
continue;
bool replaced(false);
@@ -909,7 +908,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
continue;
}
- switch (d->_imp->throw_on_blocker ? dl_blocks_error : d->_imp->opts->blocks)
+ switch (d->_imp->throw_on_blocker ? dl_blocks_error : d->_imp->opts->blocks())
{
case dl_blocks_error:
throw BlockError(stringify(*a.blocked_spec()));
@@ -933,7 +932,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (std::list<MergeList::const_iterator>::const_iterator r(will_be_installed.begin()),
r_end(will_be_installed.end()) ; r != r_end ; ++r)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), *(*r)->package_id(), d->_imp->opts->match_package_options))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), *(*r)->package_id(), d->_imp->opts->match_package_options()))
continue;
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
@@ -963,7 +962,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
for (MergeList::const_iterator r(d->_imp->merge_list.begin()),
r_end(d->_imp->merge_list.end()) ; r != r_end ; ++r)
{
- if (! match_package(*d->_imp->env, *a.blocked_spec(), *r->package_id(), d->_imp->opts->match_package_options))
+ if (! match_package(*d->_imp->env, *a.blocked_spec(), *r->package_id(), d->_imp->opts->match_package_options()))
continue;
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
@@ -1102,7 +1101,7 @@ DepList::add_package(const std::tr1::shared_ptr<const PackageID> & p, const std:
value_for<n::tag>(tag)
));
- if (_imp->opts->dependency_tags && _imp->current_package_id())
+ if (_imp->opts->dependency_tags() && _imp->current_package_id())
our_merge_entry_position->tags()->insert(make_named_values<DepTagEntry>(
value_for<n::generation>(_imp->merge_list_generation),
value_for<n::tag>(std::tr1::shared_ptr<DepTag>(new DependencyDepTag(_imp->current_package_id(), pds, conditions)))
@@ -1140,7 +1139,7 @@ DepList::add_package(const std::tr1::shared_ptr<const PackageID> & p, const std:
z = std::make_pair(_imp->merge_list_index.begin(), _imp->merge_list_index.end());
MergeListIndex::iterator zz(std::find_if(z.first, z.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, *pp, _imp->opts->match_package_options)));
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, *pp, _imp->opts->match_package_options())));
if (zz != z.second)
continue;
@@ -1163,50 +1162,50 @@ DepList::add_package(const std::tr1::shared_ptr<const PackageID> & p, const std:
}
/* add suggests */
- if (_imp->opts->suggested == dl_suggested_show && p->suggested_dependencies_key())
+ if (_imp->opts->suggested() == dl_suggested_show && p->suggested_dependencies_key())
{
Context c("When showing suggestions:");
Save<MergeList::iterator> suggest_save_merge_list_insert_position(&_imp->merge_list_insert_position,
next(our_merge_entry_position));
- ShowSuggestVisitor visitor(this, destinations, _imp->env, _imp->current_package_id(), _imp->opts->dependency_tags, false);
+ ShowSuggestVisitor visitor(this, destinations, _imp->env, _imp->current_package_id(), _imp->opts->dependency_tags(), false);
p->suggested_dependencies_key()->value()->accept(visitor);
}
/* add suggests in post depend too */
- if (_imp->opts->suggested == dl_suggested_show && p->post_dependencies_key())
+ if (_imp->opts->suggested() == dl_suggested_show && p->post_dependencies_key())
{
Context c("When showing suggestions in post dependencies key:");
Save<MergeList::iterator> suggest_save_merge_list_insert_position(&_imp->merge_list_insert_position,
next(our_merge_entry_position));
- ShowSuggestVisitor visitor(this, destinations, _imp->env, _imp->current_package_id(), _imp->opts->dependency_tags, true);
+ ShowSuggestVisitor visitor(this, destinations, _imp->env, _imp->current_package_id(), _imp->opts->dependency_tags(), true);
p->post_dependencies_key()->value()->accept(visitor);
}
/* add pre dependencies */
if (p->build_dependencies_key())
- add_predeps(*p->build_dependencies_key()->value(), _imp->opts->uninstalled_deps_pre, "build", destinations, false);
+ add_predeps(*p->build_dependencies_key()->value(), _imp->opts->uninstalled_deps_pre(), "build", destinations, false);
if (p->run_dependencies_key())
- add_predeps(*p->run_dependencies_key()->value(), _imp->opts->uninstalled_deps_runtime, "run", destinations, false);
+ add_predeps(*p->run_dependencies_key()->value(), _imp->opts->uninstalled_deps_runtime(), "run", destinations, false);
if (p->post_dependencies_key())
- add_predeps(*p->post_dependencies_key()->value(), _imp->opts->uninstalled_deps_post, "post", destinations,
- (_imp->opts->suggested == dl_suggested_install) ? false : true);
- if (_imp->opts->suggested == dl_suggested_install && p->suggested_dependencies_key())
- add_predeps(*p->suggested_dependencies_key()->value(), _imp->opts->uninstalled_deps_suggested, "suggest", destinations, false);
+ add_predeps(*p->post_dependencies_key()->value(), _imp->opts->uninstalled_deps_post(), "post", destinations,
+ (_imp->opts->suggested() == dl_suggested_install) ? false : true);
+ if (_imp->opts->suggested() == dl_suggested_install && p->suggested_dependencies_key())
+ add_predeps(*p->suggested_dependencies_key()->value(), _imp->opts->uninstalled_deps_suggested(), "suggest", destinations, false);
our_merge_entry_position->state() = dle_has_pre_deps;
_imp->merge_list_insert_position = next(our_merge_entry_post_position);
/* add post dependencies */
if (p->build_dependencies_key())
- add_postdeps(*p->build_dependencies_key()->value(), _imp->opts->uninstalled_deps_pre, "build", destinations, false);
+ add_postdeps(*p->build_dependencies_key()->value(), _imp->opts->uninstalled_deps_pre(), "build", destinations, false);
if (p->run_dependencies_key())
- add_postdeps(*p->run_dependencies_key()->value(), _imp->opts->uninstalled_deps_runtime, "run", destinations, false);
+ add_postdeps(*p->run_dependencies_key()->value(), _imp->opts->uninstalled_deps_runtime(), "run", destinations, false);
if (p->post_dependencies_key())
- add_postdeps(*p->post_dependencies_key()->value(), _imp->opts->uninstalled_deps_post, "post", destinations,
- (_imp->opts->suggested == dl_suggested_install) ? false : true);
+ add_postdeps(*p->post_dependencies_key()->value(), _imp->opts->uninstalled_deps_post(), "post", destinations,
+ (_imp->opts->suggested() == dl_suggested_install) ? false : true);
- if (_imp->opts->suggested == dl_suggested_install && p->suggested_dependencies_key())
- add_postdeps(*p->suggested_dependencies_key()->value(), _imp->opts->uninstalled_deps_suggested, "suggest", destinations, false);
+ if (_imp->opts->suggested() == dl_suggested_install && p->suggested_dependencies_key())
+ add_postdeps(*p->suggested_dependencies_key()->value(), _imp->opts->uninstalled_deps_suggested(), "suggest", destinations, false);
our_merge_entry_position->state() = dle_has_all_deps;
}
@@ -1327,8 +1326,8 @@ DepList::add_postdeps(DependencySpecTree::ConstItem & d, const DepListDepsOption
}
catch (const CircularDependencyError &)
{
- Save<DepListCircularOption> save_circular(&_imp->opts->circular,
- _imp->opts->circular == dl_circular_discard_silently ?
+ Save<DepListCircularOption> save_circular(&_imp->opts->circular(),
+ _imp->opts->circular() == dl_circular_discard_silently ?
dl_circular_discard_silently : dl_circular_discard);
Save<MergeList::iterator> save_merge_list_insert_position(&_imp->merge_list_insert_position,
_imp->merge_list.end());
@@ -1374,7 +1373,7 @@ DepList::add_already_installed_package(const std::tr1::shared_ptr<const PackageI
value_for<n::tag>(tag)
));
- if (_imp->opts->dependency_tags && _imp->current_package_id())
+ if (_imp->opts->dependency_tags() && _imp->current_package_id())
our_merge_entry->tags()->insert(make_named_values<DepTagEntry>(
value_for<n::generation>(_imp->merge_list_generation),
value_for<n::tag>(std::tr1::shared_ptr<DepTag>(new DependencyDepTag(_imp->current_package_id(), pds, conditions)))
@@ -1384,21 +1383,21 @@ DepList::add_already_installed_package(const std::tr1::shared_ptr<const PackageI
our_merge_entry);
if (p->build_dependencies_key())
- add_predeps(*p->build_dependencies_key()->value(), _imp->opts->installed_deps_pre, "build", destinations, false);
+ add_predeps(*p->build_dependencies_key()->value(), _imp->opts->installed_deps_pre(), "build", destinations, false);
if (p->run_dependencies_key())
- add_predeps(*p->run_dependencies_key()->value(), _imp->opts->installed_deps_runtime, "run", destinations, false);
+ add_predeps(*p->run_dependencies_key()->value(), _imp->opts->installed_deps_runtime(), "run", destinations, false);
if (p->post_dependencies_key())
- add_predeps(*p->post_dependencies_key()->value(), _imp->opts->installed_deps_post, "post", destinations, true);
+ add_predeps(*p->post_dependencies_key()->value(), _imp->opts->installed_deps_post(), "post", destinations, true);
our_merge_entry->state() = dle_has_pre_deps;
_imp->merge_list_insert_position = next(our_merge_entry);
if (p->build_dependencies_key())
- add_postdeps(*p->build_dependencies_key()->value(), _imp->opts->installed_deps_pre, "build", destinations, false);
+ add_postdeps(*p->build_dependencies_key()->value(), _imp->opts->installed_deps_pre(), "build", destinations, false);
if (p->run_dependencies_key())
- add_postdeps(*p->run_dependencies_key()->value(), _imp->opts->installed_deps_runtime, "run", destinations, false);
+ add_postdeps(*p->run_dependencies_key()->value(), _imp->opts->installed_deps_runtime(), "run", destinations, false);
if (p->post_dependencies_key())
- add_postdeps(*p->post_dependencies_key()->value(), _imp->opts->installed_deps_post, "post", destinations, true);
+ add_postdeps(*p->post_dependencies_key()->value(), _imp->opts->installed_deps_post(), "post", destinations, true);
}
namespace
@@ -1438,7 +1437,7 @@ DepList::prefer_installed_over_uninstalled(const PackageID & installed,
{
do
{
- switch (_imp->opts->target_type)
+ switch (_imp->opts->target_type())
{
case dl_target_package:
if (! _imp->current_package_id())
@@ -1456,16 +1455,16 @@ DepList::prefer_installed_over_uninstalled(const PackageID & installed,
;
}
- throw InternalError(PALUDIS_HERE, "Bad target_type value '" + stringify(_imp->opts->target_type) + "'");
+ throw InternalError(PALUDIS_HERE, "Bad target_type value '" + stringify(_imp->opts->target_type()) + "'");
} while (false);
- if (dl_reinstall_always == _imp->opts->reinstall)
+ if (dl_reinstall_always == _imp->opts->reinstall())
return false;
- if (dl_upgrade_as_needed == _imp->opts->upgrade)
+ if (dl_upgrade_as_needed == _imp->opts->upgrade())
return true;
- if (dl_reinstall_scm_never != _imp->opts->reinstall_scm)
+ if (dl_reinstall_scm_never != _imp->opts->reinstall_scm())
if (uninstalled.version() == installed.version() &&
(installed.version().is_scm() || is_scm(installed.name())))
{
@@ -1476,7 +1475,7 @@ DepList::prefer_installed_over_uninstalled(const PackageID & installed,
do
{
- switch (_imp->opts->reinstall_scm)
+ switch (_imp->opts->reinstall_scm())
{
case dl_reinstall_scm_always:
return false;
@@ -1507,7 +1506,7 @@ DepList::prefer_installed_over_uninstalled(const PackageID & installed,
if (uninstalled.version() != installed.version())
return false;
- if (dl_reinstall_if_use_changed == _imp->opts->reinstall)
+ if (dl_reinstall_if_use_changed == _imp->opts->reinstall())
{
std::set<ChoiceNameWithPrefix> common;
if (installed.choices_key() && uninstalled.choices_key())
@@ -1594,7 +1593,7 @@ DepList::is_top_level_target(const PackageID & e) const
if (! _imp->current_top_level_target)
throw InternalError(PALUDIS_HERE, "current_top_level_target not set?");
- return match_package_in_set(*_imp->env, *_imp->current_top_level_target, e, _imp->opts->match_package_options);
+ return match_package_in_set(*_imp->env, *_imp->current_top_level_target, e, _imp->opts->match_package_options());
}
namespace
@@ -1653,7 +1652,7 @@ DepList::replaced(const PackageID & m) const
PackageDepSpec spec(make_package_dep_spec().package(m.name()));
while (p.second != ((p.first = std::find_if(p.first, p.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, spec, _imp->opts->match_package_options)))))
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, spec, _imp->opts->match_package_options())))))
{
if (p.first->second->package_id()->slot() != m.slot())
p.first = next(p.first);
@@ -1674,7 +1673,7 @@ DepList::match_on_list(const PackageDepSpec & a) const
p = std::make_pair(_imp->merge_list_index.begin(), _imp->merge_list_index.end());
return p.second != std::find_if(p.first, p.second,
- MatchDepListEntryAgainstPackageDepSpec(_imp->env, a, _imp->opts->match_package_options));
+ MatchDepListEntryAgainstPackageDepSpec(_imp->env, a, _imp->opts->match_package_options()));
}
DepList::Iterator
diff --git a/paludis/dep_list.hh b/paludis/dep_list.hh
index 190c8c0..c9fb83f 100644
--- a/paludis/dep_list.hh
+++ b/paludis/dep_list.hh
@@ -51,13 +51,34 @@ namespace paludis
namespace n
{
struct associated_entry;
+ struct blocks;
+ struct circular;
+ struct dependency_tags;
struct destination;
+ struct downgrade;
+ struct fall_back;
struct generation;
struct handled;
+ struct installed_deps_post;
+ struct installed_deps_pre;
+ struct installed_deps_runtime;
struct kind;
+ struct match_package_options;
+ struct new_slots;
+ struct override_masks;
struct package_id;
+ struct reinstall;
+ struct reinstall_scm;
struct state;
+ struct suggested;
struct tags;
+ struct target_type;
+ struct uninstalled_deps_post;
+ struct uninstalled_deps_pre;
+ struct uninstalled_deps_runtime;
+ struct uninstalled_deps_suggested;
+ struct upgrade;
+ struct use;
}
/**
@@ -67,8 +88,6 @@ namespace paludis
*/
typedef Sequence<std::tr1::function<bool (const PackageID &, const Mask &)> > DepListOverrideMasksFunctions;
-#include <paludis/dep_list-sr.hh>
-
/**
* An entry in a DepList.
*
@@ -89,6 +108,40 @@ namespace paludis
};
/**
+ * Parameters for a DepList.
+ *
+ * \see DepList
+ * \ingroup g_dep_list
+ * \nosubgrouping
+ */
+ struct PALUDIS_VISIBLE DepListOptions
+ {
+ DepListOptions();
+
+ NamedValue<n::blocks, DepListBlocksOption> blocks;
+ NamedValue<n::circular, DepListCircularOption> circular;
+ NamedValue<n::dependency_tags, bool> dependency_tags;
+ NamedValue<n::downgrade, DepListDowngradeOption> downgrade;
+ NamedValue<n::fall_back, DepListFallBackOption> fall_back;
+ NamedValue<n::installed_deps_post, DepListDepsOption> installed_deps_post;
+ NamedValue<n::installed_deps_pre, DepListDepsOption> installed_deps_pre;
+ NamedValue<n::installed_deps_runtime, DepListDepsOption> installed_deps_runtime;
+ NamedValue<n::match_package_options, MatchPackageOptions> match_package_options;
+ NamedValue<n::new_slots, DepListNewSlotsOption> new_slots;
+ NamedValue<n::override_masks, std::tr1::shared_ptr<DepListOverrideMasksFunctions> > override_masks;
+ NamedValue<n::reinstall, DepListReinstallOption> reinstall;
+ NamedValue<n::reinstall_scm, DepListReinstallScmOption> reinstall_scm;
+ NamedValue<n::suggested, DepListSuggestedOption> suggested;
+ NamedValue<n::target_type, DepListTargetType> target_type;
+ NamedValue<n::uninstalled_deps_post, DepListDepsOption> uninstalled_deps_post;
+ NamedValue<n::uninstalled_deps_pre, DepListDepsOption> uninstalled_deps_pre;
+ NamedValue<n::uninstalled_deps_runtime, DepListDepsOption> uninstalled_deps_runtime;
+ NamedValue<n::uninstalled_deps_suggested, DepListDepsOption> uninstalled_deps_suggested;
+ NamedValue<n::upgrade, DepListUpgradeOption> upgrade;
+ NamedValue<n::use, DepListUseOption> use;
+ };
+
+ /**
* Holds a list of dependencies in merge order.
*
* \ingroup g_dep_list
diff --git a/paludis/dep_list.sr b/paludis/dep_list.sr
deleted file mode 100644
index 22fa53a..0000000
--- a/paludis/dep_list.sr
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_DepListOptions()
-{
- visible
-
- key reinstall DepListReinstallOption
- key reinstall_scm DepListReinstallScmOption
- key target_type DepListTargetType
- key upgrade DepListUpgradeOption
- key downgrade DepListDowngradeOption
- key new_slots DepListNewSlotsOption
- key fall_back DepListFallBackOption
-
- key installed_deps_pre DepListDepsOption
- key installed_deps_runtime DepListDepsOption
- key installed_deps_post DepListDepsOption
-
- key uninstalled_deps_pre DepListDepsOption
- key uninstalled_deps_runtime DepListDepsOption
- key uninstalled_deps_post DepListDepsOption
- key uninstalled_deps_suggested DepListDepsOption
-
- key suggested DepListSuggestedOption
- key circular DepListCircularOption
- key use DepListUseOption
- key blocks DepListBlocksOption
- key override_masks "std::tr1::shared_ptr<DepListOverrideMasksFunctions>"
-
- key dependency_tags bool
-
- key match_package_options MatchPackageOptions
-
- extra_constructors <<END
- DepListOptions();
-END
-
- allow_named_args
-
- doxygen_comment << "END"
- /**
- * Parameters for a DepList.
- *
- * \see DepList
- * \ingroup g_dep_list
- * \nosubgrouping
- */
-END
-}
-
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index 1df6dfb..fff8eec 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -1351,8 +1351,8 @@ namespace test_cases
void set_options(DepListOptions & opts)
{
using namespace std::tr1::placeholders;
- opts.override_masks.reset(new DepListOverrideMasksFunctions);
- opts.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
+ opts.override_masks().reset(new DepListOverrideMasksFunctions);
+ opts.override_masks()->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
}
void populate_repo()
@@ -1423,8 +1423,8 @@ namespace test_cases
void set_options(DepListOptions & opts)
{
using namespace std::tr1::placeholders;
- opts.override_masks.reset(new DepListOverrideMasksFunctions);
- opts.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
+ opts.override_masks().reset(new DepListOverrideMasksFunctions);
+ opts.override_masks()->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
}
void populate_repo()
@@ -2027,7 +2027,7 @@ namespace test_cases
installed_repo->add_version("cat", "two", "2");
DepList d(&env, DepListOptions());
- d.options()->fall_back = dl_fall_back_never;
+ d.options()->fall_back() = dl_fall_back_never;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
&env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
@@ -2055,7 +2055,7 @@ namespace test_cases
installed_repo->add_version("cat", "two", "2");
DepList d(&env, DepListOptions());
- d.options()->fall_back = dl_fall_back_as_needed;
+ d.options()->fall_back() = dl_fall_back_as_needed;
d.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
&env, UserPackageDepSpecOptions())), env.default_destinations());
d.add(PackageDepSpec(parse_user_package_dep_spec("cat/two",
@@ -2086,7 +2086,7 @@ namespace test_cases
installed_repo->add_version("cat", "three", "3");
DepList d1(&env, DepListOptions());
- d1.options()->fall_back = dl_fall_back_as_needed_except_targets;
+ d1.options()->fall_back() = dl_fall_back_as_needed_except_targets;
d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
&env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/two-2:0::installed_repo cat/one-1:0::repo");
@@ -2095,13 +2095,13 @@ namespace test_cases
env.default_destinations()), DepListError);
DepList d2(&env, DepListOptions());
- d2.options()->fall_back = dl_fall_back_as_needed_except_targets;
+ d2.options()->fall_back() = dl_fall_back_as_needed_except_targets;
TEST_CHECK_THROWS(d2.add(PackageDepSpec(parse_user_package_dep_spec("cat/two",
&env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
DepList d3(&env, DepListOptions());
- d3.options()->fall_back = dl_fall_back_as_needed_except_targets;
+ d3.options()->fall_back() = dl_fall_back_as_needed_except_targets;
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > t3(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
t3->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(new TreeLeaf<SetSpecTree, PackageDepSpec>(
@@ -2147,13 +2147,13 @@ namespace test_cases
installed_repo->add_version("cat", "two", "0");
DepList d1(&env, DepListOptions());
- d1.options()->upgrade = dl_upgrade_as_needed;
+ d1.options()->upgrade() = dl_upgrade_as_needed;
d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/one",
&env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/two-0:0::installed_repo cat/one-1:0::repo");
DepList d2(&env, DepListOptions());
- d2.options()->upgrade = dl_upgrade_as_needed;
+ d2.options()->upgrade() = dl_upgrade_as_needed;
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > t2(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
@@ -2201,7 +2201,7 @@ namespace test_cases
installed_repo->add_version("cat", "six-darcs", "0");
DepList d1(&env, DepListOptions());
- d1.options()->reinstall_scm = dl_reinstall_scm_always;
+ d1.options()->reinstall_scm() = dl_reinstall_scm_always;
d1.add(PackageDepSpec(parse_user_package_dep_spec("cat/zero",
&env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(join(d1.begin(), d1.end(), " "), "cat/one-scm:0::repo cat/two-2:0::installed_repo "
@@ -2235,7 +2235,7 @@ namespace test_cases
env.package_database()->add_repository(2, installed_repo);
DepList d1(&env, DepListOptions());
- d1.options()->dependency_tags = true;
+ d1.options()->dependency_tags() = true;
PackageDepSpec with_target_tag(parse_user_package_dep_spec("cat/one",
&env, UserPackageDepSpecOptions()));
with_target_tag.set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
diff --git a/paludis/dep_list_TEST_blockers.cc b/paludis/dep_list_TEST_blockers.cc
index aab8152..3e5b95d 100644
--- a/paludis/dep_list_TEST_blockers.cc
+++ b/paludis/dep_list_TEST_blockers.cc
@@ -46,12 +46,12 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions()),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
- d.options()->blocks = dl_blocks_accumulate;
+ d.options()->blocks() = dl_blocks_accumulate;
d.add(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions()), env.default_destinations());
TEST_CHECK_EQUAL(std::distance(d.begin(), d.end()), 2);
TEST_CHECK_EQUAL(d.begin()->kind(), dlk_block);
@@ -123,12 +123,12 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
- d.options()->blocks = dl_blocks_accumulate;
+ d.options()->blocks() = dl_blocks_accumulate;
d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())), env.default_destinations());
TEST_CHECK_EQUAL(std::distance(d.begin(), d.end()), 4);
TEST_CHECK_EQUAL(d.begin()->kind(), dlk_block);
@@ -163,7 +163,7 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
@@ -258,7 +258,7 @@ namespace test_cases
virtual void set_options(DepListOptions & p)
{
- p.reinstall = dl_reinstall_always;
+ p.reinstall() = dl_reinstall_always;
}
} test_dep_list_no_block_on_no_reinstall_via_provided;
@@ -305,7 +305,7 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
@@ -335,7 +335,7 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
@@ -364,7 +364,7 @@ namespace test_cases
{
TEST_CHECK(true);
DepList d(&env, DepListOptions());
- d.options()->blocks = dl_blocks_error;
+ d.options()->blocks() = dl_blocks_error;
TEST_CHECK_THROWS(d.add(PackageDepSpec(parse_user_package_dep_spec(merge_target, &env, UserPackageDepSpecOptions())),
env.default_destinations()), DepListError);
TEST_CHECK(d.begin() == d.end());
diff --git a/paludis/files.m4 b/paludis/files.m4
index d4b6c31..95b50fd 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -15,7 +15,7 @@ add(`condition_tracker', `hh', `cc')
add(`choice', `hh', `cc', `fwd')
add(`contents', `hh', `cc', `fwd')
add(`dep_label', `hh', `cc', `fwd')
-add(`dep_list', `hh', `cc', `fwd', `sr', `test', `fwd')
+add(`dep_list', `hh', `cc', `fwd', `test', `fwd')
add(`dep_list_exceptions', `hh', `cc')
add(`dep_list_options', `hh', `cc', `se')
add(`dep_spec', `hh', `cc', `test', `fwd')
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 6e26b11..6cfc9b2 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -400,7 +400,7 @@ InstallTask::_add_target(const std::string & target)
throw HadBothPackageAndSetTargets();
_imp->had_package_targets = true;
if (! _imp->override_target_type)
- _imp->dep_list.options()->target_type = dl_target_package;
+ _imp->dep_list.options()->target_type() = dl_target_package;
if (spec->package_ptr())
{
@@ -449,7 +449,7 @@ InstallTask::_add_target(const std::string & target)
new NamedSetDepSpec(SetName(target))))));
_imp->had_set_targets = true;
if (! _imp->override_target_type)
- _imp->dep_list.options()->target_type = dl_target_set;
+ _imp->dep_list.options()->target_type() = dl_target_set;
_imp->raw_targets.push_back(stringify(target));
}
@@ -468,7 +468,7 @@ InstallTask::_add_package_id(const std::tr1::shared_ptr<const PackageID> & targe
_imp->had_package_targets = true;
if (! _imp->override_target_type)
- _imp->dep_list.options()->target_type = dl_target_package;
+ _imp->dep_list.options()->target_type() = dl_target_package;
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec()
.package(target->name())
@@ -1199,7 +1199,7 @@ void
InstallTask::override_target_type(const DepListTargetType t)
{
_imp->override_target_type = true;
- _imp->dep_list.options()->target_type = t;
+ _imp->dep_list.options()->target_type() = t;
}
void
@@ -1365,24 +1365,24 @@ InstallTask::_unsatisfied(const DepListEntry & e) const
CheckSatisfiedVisitor v(environment(), *e.package_id());
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_pre ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_pre)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_pre() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_pre())
if (e.package_id()->build_dependencies_key())
e.package_id()->build_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_runtime ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_runtime)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_runtime() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_runtime())
if (e.package_id()->run_dependencies_key())
e.package_id()->run_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_post ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_post)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_post() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_post())
if (e.package_id()->post_dependencies_key())
e.package_id()->post_dependencies_key()->value()->accept(v);
- if ((dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_suggested ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_suggested)
- && dl_suggested_install == _imp->dep_list.options()->suggested)
+ if ((dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_suggested() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_suggested())
+ && dl_suggested_install == _imp->dep_list.options()->suggested())
if (e.package_id()->suggested_dependencies_key())
e.package_id()->suggested_dependencies_key()->value()->accept(v);
@@ -1508,24 +1508,24 @@ namespace
CheckIndependentVisitor v(env, dep_list, *i, already_checked);
- if (dl_deps_pre == dep_list.options()->uninstalled_deps_pre ||
- dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_pre)
+ if (dl_deps_pre == dep_list.options()->uninstalled_deps_pre() ||
+ dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_pre())
if ((*i)->build_dependencies_key())
(*i)->build_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == dep_list.options()->uninstalled_deps_runtime ||
- dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_runtime)
+ if (dl_deps_pre == dep_list.options()->uninstalled_deps_runtime() ||
+ dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_runtime())
if ((*i)->run_dependencies_key())
(*i)->run_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == dep_list.options()->uninstalled_deps_post ||
- dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_post)
+ if (dl_deps_pre == dep_list.options()->uninstalled_deps_post() ||
+ dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_post())
if ((*i)->post_dependencies_key())
(*i)->post_dependencies_key()->value()->accept(v);
- if ((dl_deps_pre == dep_list.options()->uninstalled_deps_suggested ||
- dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_suggested)
- && dl_suggested_install == dep_list.options()->suggested)
+ if ((dl_deps_pre == dep_list.options()->uninstalled_deps_suggested() ||
+ dl_deps_pre_or_post == dep_list.options()->uninstalled_deps_suggested())
+ && dl_suggested_install == dep_list.options()->suggested())
if ((*i)->suggested_dependencies_key())
(*i)->suggested_dependencies_key()->value()->accept(v);
@@ -1593,24 +1593,24 @@ InstallTask::_dependent(const DepListEntry & e) const
CheckIndependentVisitor v(environment(), _imp->dep_list, e.package_id(), already_checked);
already_checked->insert(e.package_id());
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_pre ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_pre)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_pre() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_pre())
if (e.package_id()->build_dependencies_key())
e.package_id()->build_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_runtime ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_runtime)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_runtime() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_runtime())
if (e.package_id()->run_dependencies_key())
e.package_id()->run_dependencies_key()->value()->accept(v);
- if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_post ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_post)
+ if (dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_post() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_post())
if (e.package_id()->post_dependencies_key())
e.package_id()->post_dependencies_key()->value()->accept(v);
- if ((dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_suggested ||
- dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_suggested)
- && dl_suggested_install == _imp->dep_list.options()->suggested)
+ if ((dl_deps_pre == _imp->dep_list.options()->uninstalled_deps_suggested() ||
+ dl_deps_pre_or_post == _imp->dep_list.options()->uninstalled_deps_suggested())
+ && dl_suggested_install == _imp->dep_list.options()->suggested())
if (e.package_id()->suggested_dependencies_key())
e.package_id()->suggested_dependencies_key()->value()->accept(v);
diff --git a/paludis/query_visitor.cc b/paludis/query_visitor.cc
index 7b75dae..298512f 100644
--- a/paludis/query_visitor.cc
+++ b/paludis/query_visitor.cc
@@ -88,7 +88,7 @@ QueryVisitor::visit_leaf(const PackageDepSpec & a)
// TODO: check destinations
std::tr1::shared_ptr<const PackageIDSequence> matches((*_imp->environment)[selection::AllVersionsUnsorted(
- generator::Matches(a, _imp->dep_list->options()->match_package_options) |
+ generator::Matches(a, _imp->dep_list->options()->match_package_options()) |
filter::InstalledAtRoot(_imp->environment->root()))]);
if (indirect_iterator(matches->end()) != std::find_if(indirect_iterator(matches->begin()), indirect_iterator(matches->end()),
diff --git a/paludis/show_suggest_visitor.cc b/paludis/show_suggest_visitor.cc
index 55aacc3..2c4163b 100644
--- a/paludis/show_suggest_visitor.cc
+++ b/paludis/show_suggest_visitor.cc
@@ -188,7 +188,7 @@ ShowSuggestVisitor::visit_leaf(const PackageDepSpec & a)
ConditionTracker(_imp->conditions).add_condition(a) : _imp->conditions);
std::tr1::shared_ptr<const PackageIDSequence> installed_matches((*_imp->environment)[selection::AllVersionsSorted(
- generator::Matches(a, _imp->dep_list->options()->match_package_options)
+ generator::Matches(a, _imp->dep_list->options()->match_package_options())
| filter::SupportsAction<InstalledAction>())]);
if (! installed_matches->empty())
{
@@ -200,7 +200,7 @@ ShowSuggestVisitor::visit_leaf(const PackageDepSpec & a)
}
std::tr1::shared_ptr<const PackageIDSequence> matches((*_imp->environment)[selection::AllVersionsSorted(
- generator::Matches(a, _imp->dep_list->options()->match_package_options)
+ generator::Matches(a, _imp->dep_list->options()->match_package_options())
| filter::SupportsAction<InstallAction>())]);
if (matches->empty())
{
diff --git a/python/dep_list.cc b/python/dep_list.cc
index 780e3ef..0bfa55a 100644
--- a/python/dep_list.cc
+++ b/python/dep_list.cc
@@ -116,79 +116,117 @@ void expose_dep_list()
"Parameters for a DepList.",
bp::init<>("__init__()")
)
- .def_readwrite("reinstall", &DepListOptions::reinstall,
+ .add_property("reinstall",
+ &named_values_getter<DepListOptions, n::reinstall, DepListReinstallOption, &DepListOptions::reinstall>,
+ &named_values_setter<DepListOptions, n::reinstall, DepListReinstallOption, &DepListOptions::reinstall>,
"[rw] DepListReinstallOption"
)
- .def_readwrite("reinstall_scm", &DepListOptions::reinstall_scm,
+ .add_property("reinstall_scm",
+ &named_values_getter<DepListOptions, n::reinstall_scm, DepListReinstallScmOption, &DepListOptions::reinstall_scm>,
+ &named_values_setter<DepListOptions, n::reinstall_scm, DepListReinstallScmOption, &DepListOptions::reinstall_scm>,
"[rw] DepListReinstallScmOption"
)
- .def_readwrite("target_type", &DepListOptions::target_type,
+ .add_property("target_type",
+ &named_values_getter<DepListOptions, n::target_type, DepListTargetType, &DepListOptions::target_type>,
+ &named_values_setter<DepListOptions, n::target_type, DepListTargetType, &DepListOptions::target_type>,
"[rw] DepListTargetType"
)
- .def_readwrite("upgrade", &DepListOptions::upgrade,
+ .add_property("upgrade",
+ &named_values_getter<DepListOptions, n::upgrade, DepListUpgradeOption, &DepListOptions::upgrade>,
+ &named_values_setter<DepListOptions, n::upgrade, DepListUpgradeOption, &DepListOptions::upgrade>,
"[rw] DepListUpgradeOption"
)
- .def_readwrite("downgrade", &DepListOptions::downgrade,
+ .add_property("downgrade",
+ &named_values_getter<DepListOptions, n::downgrade, DepListDowngradeOption, &DepListOptions::downgrade>,
+ &named_values_setter<DepListOptions, n::downgrade, DepListDowngradeOption, &DepListOptions::downgrade>,
"[rw] DepListDowngradeOption"
)
- .def_readwrite("new_slots", &DepListOptions::new_slots,
+ .add_property("new_slots",
+ &named_values_getter<DepListOptions, n::new_slots, DepListNewSlotsOption, &DepListOptions::new_slots>,
+ &named_values_setter<DepListOptions, n::new_slots, DepListNewSlotsOption, &DepListOptions::new_slots>,
"[rw] DepListNewSlotsOption"
)
- .def_readwrite("fall_back", &DepListOptions::fall_back,
+ .add_property("fall_back",
+ &named_values_getter<DepListOptions, n::fall_back, DepListFallBackOption, &DepListOptions::fall_back>,
+ &named_values_setter<DepListOptions, n::fall_back, DepListFallBackOption, &DepListOptions::fall_back>,
"[rw] DepListFallBackOption"
)
- .def_readwrite("installed_deps_pre", &DepListOptions::installed_deps_pre,
+ .add_property("installed_deps_pre",
+ &named_values_getter<DepListOptions, n::installed_deps_pre, DepListDepsOption, &DepListOptions::installed_deps_pre>,
+ &named_values_setter<DepListOptions, n::installed_deps_pre, DepListDepsOption, &DepListOptions::installed_deps_pre>,
"[rw] DepListDepsOption"
)
- .def_readwrite("installed_deps_runtime", &DepListOptions::installed_deps_runtime,
+ .add_property("installed_deps_runtime",
+ &named_values_getter<DepListOptions, n::installed_deps_runtime, DepListDepsOption, &DepListOptions::installed_deps_runtime>,
+ &named_values_setter<DepListOptions, n::installed_deps_runtime, DepListDepsOption, &DepListOptions::installed_deps_runtime>,
"[rw] DepListDepsOption"
)
- .def_readwrite("installed_deps_post", &DepListOptions::installed_deps_post,
+ .add_property("installed_deps_post",
+ &named_values_getter<DepListOptions, n::installed_deps_post, DepListDepsOption, &DepListOptions::installed_deps_post>,
+ &named_values_setter<DepListOptions, n::installed_deps_post, DepListDepsOption, &DepListOptions::installed_deps_post>,
"[rw] DepListDepsOption"
)
- .def_readwrite("uninstalled_deps_pre", &DepListOptions::uninstalled_deps_pre,
+ .add_property("uninstalled_deps_pre",
+ &named_values_getter<DepListOptions, n::uninstalled_deps_pre, DepListDepsOption, &DepListOptions::uninstalled_deps_pre>,
+ &named_values_setter<DepListOptions, n::uninstalled_deps_pre, DepListDepsOption, &DepListOptions::uninstalled_deps_pre>,
"[rw] DepListDepsOption"
)
- .def_readwrite("uninstalled_deps_runtime", &DepListOptions::uninstalled_deps_runtime,
+ .add_property("uninstalled_deps_runtime",
+ &named_values_getter<DepListOptions, n::uninstalled_deps_runtime, DepListDepsOption, &DepListOptions::uninstalled_deps_runtime>,
+ &named_values_setter<DepListOptions, n::uninstalled_deps_runtime, DepListDepsOption, &DepListOptions::uninstalled_deps_runtime>,
"[rw] DepListDepsOption"
)
- .def_readwrite("uninstalled_deps_post", &DepListOptions::uninstalled_deps_post,
+ .add_property("uninstalled_deps_post",
+ &named_values_getter<DepListOptions, n::uninstalled_deps_post, DepListDepsOption, &DepListOptions::uninstalled_deps_post>,
+ &named_values_setter<DepListOptions, n::uninstalled_deps_post, DepListDepsOption, &DepListOptions::uninstalled_deps_post>,
"[rw] DepListDepsOption"
)
- .def_readwrite("uninstalled_deps_suggested", &DepListOptions::uninstalled_deps_suggested,
+ .add_property("uninstalled_deps_suggested",
+ &named_values_getter<DepListOptions, n::uninstalled_deps_suggested, DepListDepsOption, &DepListOptions::uninstalled_deps_suggested>,
+ &named_values_setter<DepListOptions, n::uninstalled_deps_suggested, DepListDepsOption, &DepListOptions::uninstalled_deps_suggested>,
"[rw] DepListDepsOption"
)
- .def_readwrite("suggested", &DepListOptions::suggested,
+ .add_property("suggested",
+ &named_values_getter<DepListOptions, n::suggested, DepListSuggestedOption, &DepListOptions::suggested>,
+ &named_values_setter<DepListOptions, n::suggested, DepListSuggestedOption, &DepListOptions::suggested>,
"[rw] DepListSuggestedOption"
)
- .def_readwrite("circular", &DepListOptions::circular,
- "[rw] DepListCircularOption"
+ .add_property("circular",
+ &named_values_getter<DepListOptions, n::circular, DepListCircularOption, &DepListOptions::circular>,
+ &named_values_setter<DepListOptions, n::circular, DepListCircularOption, &DepListOptions::circular>,
+ "[rw] DepListSuggestedOption"
)
- .def_readwrite("use", &DepListOptions::use,
+ .add_property("use",
+ &named_values_getter<DepListOptions, n::use, DepListUseOption, &DepListOptions::use>,
+ &named_values_setter<DepListOptions, n::use, DepListUseOption, &DepListOptions::use>,
"[rw] DepListUseOption"
)
- .def_readwrite("blocks", &DepListOptions::blocks,
+ .add_property("blocks",
+ &named_values_getter<DepListOptions, n::blocks, DepListBlocksOption, &DepListOptions::blocks>,
+ &named_values_setter<DepListOptions, n::blocks, DepListBlocksOption, &DepListOptions::blocks>,
"[rw] DepListBlocksOption"
)
- .def_readwrite("dependency_tags", &DepListOptions::dependency_tags,
+ .add_property("dependency_tags",
+ &named_values_getter<DepListOptions, n::dependency_tags, bool, &DepListOptions::dependency_tags>,
+ &named_values_setter<DepListOptions, n::dependency_tags, bool, &DepListOptions::dependency_tags>,
"[rw] bool"
)
;
diff --git a/ruby/dep_list.cc b/ruby/dep_list.cc
index eaf77a2..2d5bf86 100644
--- a/ruby/dep_list.cc
+++ b/ruby/dep_list.cc
@@ -382,31 +382,28 @@ namespace
if (value_for_circular < 0 || value_for_blocks >= last_dl_blocks)
rb_raise(rb_eArgError, "blocks out of range");
- ptr = new std::tr1::shared_ptr<DepListOptions>(
- new DepListOptions(
- static_cast<DepListReinstallOption>(value_for_reinstall),
- static_cast<DepListReinstallScmOption>(value_for_reinstall_scm),
- static_cast<DepListTargetType>(value_for_target_type),
- static_cast<DepListUpgradeOption>(value_for_upgrade),
- static_cast<DepListDowngradeOption>(value_for_downgrade),
- static_cast<DepListNewSlotsOption>(value_for_new_slots),
- static_cast<DepListFallBackOption>(value_for_fall_back),
- static_cast<DepListDepsOption>(value_for_installed_deps_pre),
- static_cast<DepListDepsOption>(value_for_installed_deps_runtime),
- static_cast<DepListDepsOption>(value_for_installed_deps_post),
- static_cast<DepListDepsOption>(value_for_uninstalled_deps_pre),
- static_cast<DepListDepsOption>(value_for_uninstalled_deps_runtime),
- static_cast<DepListDepsOption>(value_for_uninstalled_deps_post),
- static_cast<DepListDepsOption>(value_for_uninstalled_deps_suggested),
- static_cast<DepListSuggestedOption>(value_for_suggested),
- static_cast<DepListCircularOption>(value_for_circular),
- static_cast<DepListUseOption>(value_for_use),
- static_cast<DepListBlocksOption>(value_for_blocks),
- value_for_override_masks_functions,
- value_for_dependency_tags,
- value_for_match_package_options
- )
- );
+ ptr = new std::tr1::shared_ptr<DepListOptions>(new DepListOptions);
+ (*ptr)->blocks() = static_cast<DepListBlocksOption>(value_for_blocks);
+ (*ptr)->circular() = static_cast<DepListCircularOption>(value_for_circular);
+ (*ptr)->dependency_tags() = value_for_dependency_tags;
+ (*ptr)->downgrade() = static_cast<DepListDowngradeOption>(value_for_downgrade);
+ (*ptr)->fall_back() = static_cast<DepListFallBackOption>(value_for_fall_back);
+ (*ptr)->installed_deps_post() = static_cast<DepListDepsOption>(value_for_installed_deps_post);
+ (*ptr)->installed_deps_pre() = static_cast<DepListDepsOption>(value_for_installed_deps_pre);
+ (*ptr)->installed_deps_runtime() = static_cast<DepListDepsOption>(value_for_installed_deps_runtime);
+ (*ptr)->match_package_options() = value_for_match_package_options;
+ (*ptr)->new_slots() = static_cast<DepListNewSlotsOption>(value_for_new_slots);
+ (*ptr)->override_masks() = value_for_override_masks_functions;
+ (*ptr)->reinstall() = static_cast<DepListReinstallOption>(value_for_reinstall);
+ (*ptr)->reinstall_scm() = static_cast<DepListReinstallScmOption>(value_for_reinstall_scm);
+ (*ptr)->suggested() = static_cast<DepListSuggestedOption>(value_for_suggested);
+ (*ptr)->target_type() = static_cast<DepListTargetType>(value_for_target_type);
+ (*ptr)->uninstalled_deps_post() = static_cast<DepListDepsOption>(value_for_uninstalled_deps_post);
+ (*ptr)->uninstalled_deps_pre() = static_cast<DepListDepsOption>(value_for_uninstalled_deps_pre);
+ (*ptr)->uninstalled_deps_runtime() = static_cast<DepListDepsOption>(value_for_uninstalled_deps_runtime);
+ (*ptr)->uninstalled_deps_suggested() = static_cast<DepListDepsOption>(value_for_uninstalled_deps_suggested);
+ (*ptr)->upgrade() = static_cast<DepListUpgradeOption>(value_for_upgrade);
+ (*ptr)->use() = static_cast<DepListUseOption>(value_for_use);
VALUE tdata(Data_Wrap_Struct(self, 0, &Common<std::tr1::shared_ptr<DepListOptions> >::free, ptr));
rb_obj_call_init(tdata, argc, argv);
@@ -716,7 +713,7 @@ namespace
*
* Set our DepListBlockOption
*/
- template <typename T_, T_ DepListOptions::* m_>
+ template <typename T_, typename K_, NamedValue<K_, T_> DepListOptions::* m_>
struct OptionsMember
{
static VALUE
@@ -724,7 +721,7 @@ namespace
{
std::tr1::shared_ptr<DepListOptions> * p;
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
- return INT2FIX((**p).*m_);
+ return INT2FIX(((**p).*m_)());
}
static VALUE
@@ -734,7 +731,7 @@ namespace
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
try
{
- ((**p).*m_) = static_cast<T_>(NUM2INT(val));
+ ((**p).*m_)() = static_cast<T_>(NUM2INT(val));
return Qnil;
}
catch (const std::exception & e)
@@ -755,7 +752,7 @@ namespace
{
std::tr1::shared_ptr<DepListOptions> * p;
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
- return (*p)->dependency_tags ? Qtrue : Qfalse;
+ return (*p)->dependency_tags() ? Qtrue : Qfalse;
}
/*
@@ -773,11 +770,11 @@ namespace
{
if (Qtrue == tags)
{
- (*p)->dependency_tags = true;
+ (*p)->dependency_tags() = true;
}
else if (Qfalse == tags)
{
- (*p)->dependency_tags = false;
+ (*p)->dependency_tags() = false;
}
else
{
@@ -802,7 +799,7 @@ namespace
{
std::tr1::shared_ptr<DepListOptions> * p;
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
- return (*p)->override_masks ? dep_list_override_masks_functions_to_value((*p)->override_masks) : Qnil;
+ return (*p)->override_masks() ? dep_list_override_masks_functions_to_value((*p)->override_masks()) : Qnil;
}
/*
@@ -818,7 +815,7 @@ namespace
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
try
{
- (*p)->override_masks = value_to_dep_list_override_masks_functions(omf);
+ (*p)->override_masks() = value_to_dep_list_override_masks_functions(omf);
return Qnil;
}
catch (const std::exception & e)
@@ -838,7 +835,7 @@ namespace
{
std::tr1::shared_ptr<DepListOptions> * p;
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
- return match_package_options_to_value((*p)->match_package_options);
+ return match_package_options_to_value((*p)->match_package_options());
}
/*
@@ -854,7 +851,7 @@ namespace
Data_Get_Struct(self, std::tr1::shared_ptr<DepListOptions>, p);
try
{
- (*p)->match_package_options = value_to_match_package_options(omf);
+ (*p)->match_package_options() = value_to_match_package_options(omf);
return Qnil;
}
catch (const std::exception & e)
@@ -1347,78 +1344,78 @@ namespace
rb_define_singleton_method(c_dep_list_options, "new", RUBY_FUNC_CAST(&dep_list_options_new), -1);
rb_define_method(c_dep_list_options, "initialize", RUBY_FUNC_CAST(&dep_list_options_init), -1);
rb_define_method(c_dep_list_options, "reinstall",
- RUBY_FUNC_CAST((&OptionsMember<DepListReinstallOption, &DepListOptions::reinstall>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListReinstallOption, n::reinstall, &DepListOptions::reinstall>::fetch)),0);
rb_define_method(c_dep_list_options, "reinstall_scm",
- RUBY_FUNC_CAST((&OptionsMember<DepListReinstallScmOption, &DepListOptions::reinstall_scm>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListReinstallScmOption, n::reinstall_scm, &DepListOptions::reinstall_scm>::fetch)),0);
rb_define_method(c_dep_list_options, "target_type",
- RUBY_FUNC_CAST((&OptionsMember<DepListTargetType, &DepListOptions::target_type>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListTargetType, n::target_type, &DepListOptions::target_type>::fetch)),0);
rb_define_method(c_dep_list_options, "downgrade",
- RUBY_FUNC_CAST((&OptionsMember<DepListDowngradeOption, &DepListOptions::downgrade>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDowngradeOption, n::downgrade, &DepListOptions::downgrade>::fetch)),0);
rb_define_method(c_dep_list_options, "upgrade",
- RUBY_FUNC_CAST((&OptionsMember<DepListUpgradeOption, &DepListOptions::upgrade>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListUpgradeOption, n::upgrade, &DepListOptions::upgrade>::fetch)),0);
rb_define_method(c_dep_list_options, "new_slots",
- RUBY_FUNC_CAST((&OptionsMember<DepListNewSlotsOption, &DepListOptions::new_slots>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListNewSlotsOption, n::new_slots, &DepListOptions::new_slots>::fetch)),0);
rb_define_method(c_dep_list_options, "fall_back",
- RUBY_FUNC_CAST((&OptionsMember<DepListFallBackOption, &DepListOptions::fall_back>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListFallBackOption, n::fall_back, &DepListOptions::fall_back>::fetch)),0);
rb_define_method(c_dep_list_options, "installed_deps_pre",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_pre>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_pre, &DepListOptions::installed_deps_pre>::fetch)),0);
rb_define_method(c_dep_list_options, "installed_deps_runtime",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_runtime>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_runtime, &DepListOptions::installed_deps_runtime>::fetch)),0);
rb_define_method(c_dep_list_options, "installed_deps_post",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_post>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_post, &DepListOptions::installed_deps_post>::fetch)),0);
rb_define_method(c_dep_list_options, "uninstalled_deps_pre",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_pre>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_pre, &DepListOptions::uninstalled_deps_pre>::fetch)),0);
rb_define_method(c_dep_list_options, "uninstalled_deps_runtime",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_runtime>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_runtime, &DepListOptions::uninstalled_deps_runtime>::fetch)),0);
rb_define_method(c_dep_list_options, "uninstalled_deps_post",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_post>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_post, &DepListOptions::uninstalled_deps_post>::fetch)),0);
rb_define_method(c_dep_list_options, "uninstalled_deps_suggested",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_suggested>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_suggested, &DepListOptions::uninstalled_deps_suggested>::fetch)),0);
rb_define_method(c_dep_list_options, "suggested",
- RUBY_FUNC_CAST((&OptionsMember<DepListSuggestedOption, &DepListOptions::suggested>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListSuggestedOption, n::suggested, &DepListOptions::suggested>::fetch)),0);
rb_define_method(c_dep_list_options, "circular",
- RUBY_FUNC_CAST((&OptionsMember<DepListCircularOption, &DepListOptions::circular>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListCircularOption, n::circular, &DepListOptions::circular>::fetch)),0);
rb_define_method(c_dep_list_options, "use",
- RUBY_FUNC_CAST((&OptionsMember<DepListUseOption, &DepListOptions::use>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListUseOption, n::use, &DepListOptions::use>::fetch)),0);
rb_define_method(c_dep_list_options, "blocks",
- RUBY_FUNC_CAST((&OptionsMember<DepListBlocksOption, &DepListOptions::blocks>::fetch)),0);
+ RUBY_FUNC_CAST((&OptionsMember<DepListBlocksOption, n::blocks, &DepListOptions::blocks>::fetch)),0);
rb_define_method(c_dep_list_options, "reinstall=",
- RUBY_FUNC_CAST((&OptionsMember<DepListReinstallOption, &DepListOptions::reinstall>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListReinstallOption, n::reinstall, &DepListOptions::reinstall>::set)),1);
rb_define_method(c_dep_list_options, "reinstall_scm=",
- RUBY_FUNC_CAST((&OptionsMember<DepListReinstallScmOption, &DepListOptions::reinstall_scm>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListReinstallScmOption, n::reinstall_scm, &DepListOptions::reinstall_scm>::set)),1);
rb_define_method(c_dep_list_options, "target_type=",
- RUBY_FUNC_CAST((&OptionsMember<DepListTargetType, &DepListOptions::target_type>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListTargetType, n::target_type, &DepListOptions::target_type>::set)),1);
rb_define_method(c_dep_list_options, "upgrade=",
- RUBY_FUNC_CAST((&OptionsMember<DepListUpgradeOption, &DepListOptions::upgrade>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListUpgradeOption, n::upgrade, &DepListOptions::upgrade>::set)),1);
rb_define_method(c_dep_list_options, "downgrade=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDowngradeOption, &DepListOptions::downgrade>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDowngradeOption, n::downgrade, &DepListOptions::downgrade>::set)),1);
rb_define_method(c_dep_list_options, "new_slots=",
- RUBY_FUNC_CAST((&OptionsMember<DepListNewSlotsOption, &DepListOptions::new_slots>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListNewSlotsOption, n::new_slots, &DepListOptions::new_slots>::set)),1);
rb_define_method(c_dep_list_options, "fall_back=",
- RUBY_FUNC_CAST((&OptionsMember<DepListFallBackOption, &DepListOptions::fall_back>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListFallBackOption, n::fall_back, &DepListOptions::fall_back>::set)),1);
rb_define_method(c_dep_list_options, "installed_deps_pre=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_pre>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_pre, &DepListOptions::installed_deps_pre>::set)),1);
rb_define_method(c_dep_list_options, "installed_deps_runtime=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_runtime>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_runtime, &DepListOptions::installed_deps_runtime>::set)),1);
rb_define_method(c_dep_list_options, "installed_deps_post=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::installed_deps_post>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::installed_deps_post, &DepListOptions::installed_deps_post>::set)),1);
rb_define_method(c_dep_list_options, "uninstalled_deps_pre=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_pre>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_pre, &DepListOptions::uninstalled_deps_pre>::set)),1);
rb_define_method(c_dep_list_options, "uninstalled_deps_runtime=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_runtime>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_runtime, &DepListOptions::uninstalled_deps_runtime>::set)),1);
rb_define_method(c_dep_list_options, "uninstalled_deps_post=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_post>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_post, &DepListOptions::uninstalled_deps_post>::set)),1);
rb_define_method(c_dep_list_options, "uninstalled_deps_suggested=",
- RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, &DepListOptions::uninstalled_deps_suggested>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListDepsOption, n::uninstalled_deps_suggested, &DepListOptions::uninstalled_deps_suggested>::set)),1);
rb_define_method(c_dep_list_options, "suggested=",
- RUBY_FUNC_CAST((&OptionsMember<DepListSuggestedOption, &DepListOptions::suggested>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListSuggestedOption, n::suggested, &DepListOptions::suggested>::set)),1);
rb_define_method(c_dep_list_options, "circular=",
- RUBY_FUNC_CAST((&OptionsMember<DepListCircularOption, &DepListOptions::circular>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListCircularOption, n::circular, &DepListOptions::circular>::set)),1);
rb_define_method(c_dep_list_options, "use=",
- RUBY_FUNC_CAST((&OptionsMember<DepListUseOption, &DepListOptions::use>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListUseOption, n::use, &DepListOptions::use>::set)),1);
rb_define_method(c_dep_list_options, "blocks=",
- RUBY_FUNC_CAST((&OptionsMember<DepListBlocksOption, &DepListOptions::blocks>::set)),1);
+ RUBY_FUNC_CAST((&OptionsMember<DepListBlocksOption, n::blocks, &DepListOptions::blocks>::set)),1);
rb_define_method(c_dep_list_options, "dependency_tags", RUBY_FUNC_CAST(&dep_list_options_dependency_tags),0);
diff --git a/src/clients/adjutrix/display_default_system_resolution.cc b/src/clients/adjutrix/display_default_system_resolution.cc
index db3ccbf..9176510 100644
--- a/src/clients/adjutrix/display_default_system_resolution.cc
+++ b/src/clients/adjutrix/display_default_system_resolution.cc
@@ -71,8 +71,8 @@ namespace
cout << std::left << std::setw(20) << (desc + ":") << display_profile << endl;
DepListOptions d_options;
- d_options.circular = dl_circular_discard_silently;
- d_options.blocks = dl_blocks_discard_completely;
+ d_options.circular() = dl_circular_discard_silently;
+ d_options.blocks() = dl_blocks_discard_completely;
DepList d(&env, d_options);
try
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index 774fea9..93a461c 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -71,14 +71,14 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
env.set_accept_unstable('~' == stringify(target_keyword).at(0));
DepListOptions d_options;
- d_options.circular = dl_circular_discard_silently;
- d_options.use = dl_use_deps_take_all;
- d_options.blocks = dl_blocks_discard_completely;
- d_options.override_masks.reset(new DepListOverrideMasksFunctions);
- d_options.override_masks->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
- d_options.override_masks->push_back(std::tr1::bind(&override_unkeyworded, &env, _1, _2));
- d_options.override_masks->push_back(std::tr1::bind(&override_repository_masks, _2));
- d_options.match_package_options += mpo_ignore_additional_requirements;
+ d_options.circular() = dl_circular_discard_silently;
+ d_options.use() = dl_use_deps_take_all;
+ d_options.blocks() = dl_blocks_discard_completely;
+ d_options.override_masks().reset(new DepListOverrideMasksFunctions);
+ d_options.override_masks()->push_back(std::tr1::bind(&override_tilde_keywords, &env, _1, _2));
+ d_options.override_masks()->push_back(std::tr1::bind(&override_unkeyworded, &env, _1, _2));
+ d_options.override_masks()->push_back(std::tr1::bind(&override_repository_masks, _2));
+ d_options.match_package_options() += mpo_ignore_additional_requirements;
DepList d(&env, d_options);