[Aptitude-svn-commit] r4239 - in branches/aptitude-0.3/aptitude: .
src/generic/problemresolver
Daniel Burrows
dburrows at costa.debian.org
Sat Sep 24 17:09:59 UTC 2005
Author: dburrows
Date: Sat Sep 24 17:09:54 2005
New Revision: 4239
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/solution.h
Log:
If an action coincidentally fixes an unresolved dependency,
remove that dependency from the unresolved set.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Sep 24 17:09:54 2005
@@ -1,5 +1,10 @@
2005-09-24 Daniel Burrows <dburrows at debian.org>
+ * src/generic/problemresolver/solution.h:
+
+ If an action coincidentally fixes an unresolved dependency,
+ remove that dependency from the unresolved set.
+
* src/generic/problemresolver/problemresolver.h:
Remove the forced_broken interface from the resolver itself.
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/solution.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/solution.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/solution.h Sat Sep 24 17:09:54 2005
@@ -342,6 +342,16 @@
imm::set<dep> unresolved_soft_deps = s.get_unresolved_soft_deps();
int action_score = s.get_action_score();
+ // Add notes about unresolved dependencies
+ for(u_iter ui = ubegin; ui != uend; ++ui)
+ {
+ const dep &d = *ui;
+
+ assert(broken_deps.contains(d));
+ broken_deps.erase(d);
+ unresolved_soft_deps.insert(d);
+ }
+
for(a_iter ai = abegin; ai != aend; ++ai)
{
const action &a = *ai;
@@ -374,11 +384,16 @@
{
dep rd = *rdi;
- if(!unresolved_soft_deps.contains(rd) &&
- (rd).broken_under(tmpsol))
- broken_deps.insert(rd);
+ if((rd).broken_under(tmpsol))
+ {
+ if(!unresolved_soft_deps.contains(rd))
+ broken_deps.insert(rd);
+ }
else
- broken_deps.erase(rd);
+ {
+ broken_deps.erase(rd);
+ unresolved_soft_deps.erase(rd);
+ }
}
// Check reverse deps of the new version
@@ -391,11 +406,16 @@
{
dep rd = *rdi;
- if(!unresolved_soft_deps.contains(rd) &&
- (rd).broken_under(tmpsol))
- broken_deps.insert(rd);
+ if((rd).broken_under(tmpsol))
+ {
+ if(!unresolved_soft_deps.contains(rd))
+ broken_deps.insert(rd);
+ }
else
- broken_deps.erase(rd);
+ {
+ broken_deps.erase(rd);
+ unresolved_soft_deps.erase(rd);
+ }
}
// Remove all forward deps of the old version (they're
@@ -406,6 +426,7 @@
dep d = *di;
broken_deps.erase(d);
+ unresolved_soft_deps.erase(d);
}
// Check forward deps of the new version (no need to erase
@@ -422,15 +443,6 @@
}
}
- // Add notes about unresolved dependencies
- for(u_iter ui = ubegin; ui != uend; ++ui)
- {
- const dep &d = *ui;
-
- assert(broken_deps.contains(d));
- broken_deps.erase(d);
- unresolved_soft_deps.insert(d);
- }
int score
= action_score + broken_deps.size()*weights.broken_score
More information about the Aptitude-svn-commit
mailing list