aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-31 17:46:16 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-31 17:46:16 +0000
commit27dd26e3f7dfbc71755b52b4305242559e1645a7 (patch)
treeaf4ebf58c96e47b3ac53482ea755c5a042956514
parentfc026ef00a65518b590866ce4c06f6dfffbb2583 (diff)
downloadpaludis-27dd26e3f7dfbc71755b52b4305242559e1645a7.tar.gz
paludis-27dd26e3f7dfbc71755b52b4305242559e1645a7.tar.xz
Don't require permission for target[<1.23]
Fixes: ticket:957
-rw-r--r--src/clients/cave/resolve_common.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index be08186..89826c8 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -973,6 +973,7 @@ paludis::cave::resolve_common(
ScopedNotifierCallback display_callback_holder(env.get(),
NotifierCallbackFunction(std::cref(display_callback)));
+ bool first(true);
while (true)
{
try
@@ -983,6 +984,25 @@ paludis::cave::resolve_common(
targets_cleaned_up = std::make_shared<Sequence<std::string>>();
} else
targets_cleaned_up = add_resolver_targets(env, resolver, resolution_options, targets_if_not_purge, is_set);
+
+ if (first)
+ {
+ if (targets_cleaned_up)
+ for (auto t(targets_cleaned_up->begin()), t_end(targets_cleaned_up->end()) ;
+ t != t_end ; ++t)
+ if ('!' != t->at(0) && std::string::npos != t->find('/'))
+ {
+ PackageDepSpec ts(parse_user_package_dep_spec(*t, env.get(), { }));
+ if (ts.version_requirements_ptr() && ! ts.version_requirements_ptr()->empty())
+ {
+ confirm_helper.add_permit_downgrade_spec(ts);
+ confirm_helper.add_permit_old_version_spec(ts);
+ }
+ }
+
+ first = false;
+ }
+
resolver->resolve();
break;
}