[Aptitude-svn-commit] r4163 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Wed Sep 21 23:03:10 UTC 2005
Author: dburrows
Date: Wed Sep 21 23:03:07 2005
New Revision: 4163
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Ignore attempts to apply solutions that don't exist yet.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Sep 21 23:03:07 2005
@@ -1,5 +1,9 @@
2005-09-21 Daniel Burrows <dburrows at debian.org>
+ * src/ui.cc:
+
+ Ignore attempts to apply solutions that don't exist yet.
+
* src/broken_indicator.cc, src/cmdline/cmdline_resolver.cc, src/generic/resolver_manager.cc, src/generic/resolver_manager.h, src/solution_dialog.cc, src/solution_screen.cc, src/ui.cc:
Make the number of steps an explicit parameter to get_solution
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Wed Sep 21 23:03:07 2005
@@ -1542,12 +1542,24 @@
void do_apply_solution()
{
- if(apt_cache_file && resman->resolver_exists())
+ if(!apt_cache_file)
+ return;
+
+ resolver_manager::state state = resman->state_snapshot();
+
+ if(state.resolver_exists)
{
+ if(!(state.selected_solution >= 0 &&
+ state.selected_solution < state.generated_solutions))
+ {
+ beep();
+ return;
+ }
+
undo_group *undo=new apt_undo_group;
try
{
- (*apt_cache_file)->apply_solution(resman->get_solution(resman->get_selected_solution(), aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000)),
+ (*apt_cache_file)->apply_solution(resman->get_solution(state.selected_solution, aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000)),
undo);
}
catch(NoMoreSolutions)
More information about the Aptitude-svn-commit
mailing list