[Aptitude-svn-commit] r4054 - in branches/aptitude-0.3/aptitude: .
src/generic/problemresolver
Daniel Burrows
dburrows at costa.debian.org
Tue Sep 6 19:49:22 UTC 2005
Author: dburrows
Date: Tue Sep 6 19:49:19 2005
New Revision: 4054
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/solution.h
Log:
Actually give solutions that break no dependencies a score bonus.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Sep 6 19:49:19 2005
@@ -1,5 +1,15 @@
2005-09-06 Daniel Burrows <dburrows at debian.org>
+ * src/generic/solution.h:
+
+ Actually factor in the full_solution_score when a new solution
+ will be broken-dep-less.
+
+ * tests/test_resolver.cc:
+
+ Fix a stupidity in the test (infinity is expected to be
+ positive, not negative, when setting up the resolver).
+
* tests/test_resolver.cc:
Add a basic test that the rejection system won't go nuts and
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 Tue Sep 6 19:49:19 2005
@@ -292,6 +292,9 @@
{
int score = initial_broken.size() * weights.broken_score;
+ if(initial_broken.empty())
+ score += full_solution_score;
+
return generic_solution(new solution_rep(imm::map<package, action>(),
initial_broken,
imm::set<dep>(),
@@ -416,6 +419,9 @@
= action_score + broken_deps.size()*weights.broken_score
+ unresolved_soft_deps.size()*weights.unfixed_soft_score;
+ if(broken_deps.empty())
+ score += weights.full_solution_score;
+
return generic_solution(new solution_rep(actions,
broken_deps,
unresolved_soft_deps,
More information about the Aptitude-svn-commit
mailing list