Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11695 - /trunk/sat-solver/src/policy.c
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Mon, 17 Nov 2008 16:11:48 -0000
  • Message-id: <20081117161148.B3803348C1@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Mon Nov 17 17:11:48 2008
New Revision: 11695

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11695&view=rev
Log:
- fix repo prio pruning in the case when first solvable is installed

Modified:
trunk/sat-solver/src/policy.c

Modified: trunk/sat-solver/src/policy.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/policy.c?rev=11695&r1=11694&r2=11695&view=diff
==============================================================================
--- trunk/sat-solver/src/policy.c (original)
+++ trunk/sat-solver/src/policy.c Mon Nov 17 17:11:48 2008
@@ -95,7 +95,7 @@
{
int i, j;
Solvable *s;
- int bestprio = 0;
+ int bestprio = 0, bestprioset = 0;

/* prune to highest priority */
for (i = 0; i < plist->count; i++) /* find highest prio in queue */
@@ -103,9 +103,14 @@
s = pool->solvables + plist->elements[i];
if (pool->installed && s->repo == pool->installed)
continue;
- if (i == 0 || s->repo->priority > bestprio)
- bestprio = s->repo->priority;
+ if (!bestprioset || s->repo->priority > bestprio)
+ {
+ bestprio = s->repo->priority;
+ bestprioset = 1;
+ }
}
+ if (!bestprioset)
+ return;
for (i = j = 0; i < plist->count; i++) /* remove all with lower prio */
{
s = pool->solvables + plist->elements[i];

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages