[Aptitude-devel] r3176 - in branches/aptitude-0.3/aptitude: . src/cmdline
Daniel Burrows
dburrows@costa.debian.org
Thu, 28 Apr 2005 16:14:41 +0000
Author: dburrows
Date: Thu Apr 28 16:14:38 2005
New Revision: 3176
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
Log:
Make the expression of 'reject solution' cleaner.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Thu Apr 28 16:14:38 2005
@@ -2,6 +2,10 @@
* src/cmdline/cmdline_resolver.cc:
+ Streamline the "reject solution" command.
+
+ * src/cmdline/cmdline_resolver.cc:
+
Doh, C++ varargs have to be explicitly terminated; do that
instead of crashing.
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc Thu Apr 28 16:14:38 2005
@@ -164,10 +164,8 @@
// Move to the last cached solution.
if(curr_count>0)
- while((*apt_cache_file)->get_selected_solution()+1<curr_count)
+ while((*apt_cache_file)->get_selected_solution()<curr_count)
(*apt_cache_file)->next_solution();
-
- (*apt_cache_file)->next_solution();
}
break;
case 'Q':
@@ -236,7 +234,11 @@
return false;
}
else
- cout << _("No more solutions.") << endl;
+ {
+ cout << _("No more solutions.") << endl;
+ // Force it to re-print the last solution.
+ lastsol.nullify();
+ }
}
}