[Aptitude-svn-commit] r4215 - in branches/aptitude-0.3/aptitude: .
src/generic/problemresolver
Daniel Burrows
dburrows at costa.debian.org
Sat Sep 24 04:24:46 UTC 2005
Author: dburrows
Date: Sat Sep 24 04:24:43 2005
New Revision: 4215
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
branches/aptitude-0.3/aptitude/src/generic/problemresolver/resolver_undo.h
Log:
Correct some silly typos/thinkos.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Sep 24 04:24:43 2005
@@ -2,6 +2,11 @@
* src/generic/problemresolver/problemresolver.h, src/generic/problemresolver/resolver_undo.h:
+ Correct a typo (generic_problem_resolver, not generic_resolver)
+ so the new code compiles.
+
+ * src/generic/problemresolver/problemresolver.h, src/generic/problemresolver/resolver_undo.h:
+
Add support in the resolver for recording the inverse of
operations performed on it. (could be done at a higher level,
but for obvious reasons, the resolver is uniquely positioned to
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h Sat Sep 24 04:24:43 2005
@@ -2065,13 +2065,13 @@
*/
void reject_version(const version &ver, undo_group *undo = NULL)
{
- std::pair<std::set<version>, bool>
+ std::pair<typename std::set<version>::const_iterator, bool>
insert_result = user_rejected.insert(ver);
if(insert_result.second)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_resolver<PackageUniverse>::unreject_version));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_problem_resolver<PackageUniverse>::unreject_version));
unmandate_version(ver, undo);
}
@@ -2088,7 +2088,7 @@
if(erased_count > 0)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_resolver<PackageUniverse>::reject_version));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_problem_resolver<PackageUniverse>::reject_version));
deferred_dirty = true;
}
@@ -2096,13 +2096,13 @@
void mandate_version(const version &ver, undo_group *undo = NULL)
{
- std::pair<std::set<version>, bool>
+ std::pair<typename std::set<version>::const_iterator, bool>
insert_result = user_mandated.insert(ver);
if(insert_result.second)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_resolver<PackageUniverse>::unmandate_version));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_problem_resolver<PackageUniverse>::unmandate_version));
unreject_version(ver, undo);
}
@@ -2116,7 +2116,7 @@
if(erased_count > 0)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_resolver<PackageUniverse>::mandate_version));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, version>(this, ver, &generic_problem_resolver<PackageUniverse>::mandate_version));
deferred_dirty = true;
}
@@ -2145,20 +2145,20 @@
{
assert(d.is_soft());
- std::pair<std::set<dep>, bool>
+ std::pair<typename std::set<dep>::const_iterator, bool>
insert_result = user_hardened.insert(d);
if(insert_result.second)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, dep>(this, d, &generic_resolver<PackageUniverse>::unharden));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, dep>(this, d, &generic_problem_resolver<PackageUniverse>::unharden));
unforce_break(d, undo);
}
}
/** Un-harden (soften?) the given dependency. */
- void unharden(const dep &d, const undo_group *undo = NULL)
+ void unharden(const dep &d, undo_group *undo = NULL)
{
typename std::set<dep>::size_type
erased_count = user_hardened.erase(d);
@@ -2166,7 +2166,7 @@
if(erased_count > 0)
{
if(undo != NULL)
- undo->add_item(new undo_resolver_manipulation<PackageUniverse, dep>(this, d, &generic_resolver<PackageUniverse>::harden));
+ undo->add_item(new undo_resolver_manipulation<PackageUniverse, dep>(this, d, &generic_problem_resolver<PackageUniverse>::harden));
deferred_dirty = true;
}
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/resolver_undo.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/resolver_undo.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/resolver_undo.h Sat Sep 24 04:24:43 2005
@@ -26,21 +26,21 @@
#include "../undo.h"
template<typename PackageUniverse>
-class generic_resolver;
+class generic_problem_resolver;
/** An undoable that executes the given action on the given object. */
template<typename PackageUniverse, typename T>
class undo_resolver_manipulation : public undoable
{
public:
- typedef void (generic_resolver<PackageUniverse>::*undo_method)(const T &, undo_group *);
+ typedef void (generic_problem_resolver<PackageUniverse>::*undo_method)(const T &, undo_group *);
- generic_resolver<PackageUniverse> *resolver;
+ generic_problem_resolver<PackageUniverse> *resolver;
T t;
undo_method reverse_action;
public:
- undo_resolver_manipulation(generic_resolver<PackageUniverse> *_resolver,
+ undo_resolver_manipulation(generic_problem_resolver<PackageUniverse> *_resolver,
const T &_t,
undo_method _reverse_action)
: resolver(_resolver), t(_t), reverse_action(_reverse_action)
More information about the Aptitude-svn-commit
mailing list