{
if (specialupdaters && (d = specialupdaters[i - installed->start]) != 0)
{
+ int j;
/* special multiversion handling, make sure best version is chosen */
if (rr->p == i && solv->decisionmap[i] >= 0)
queue_push(dq, i);
while ((p = pool->whatprovidesdata[d++]) != 0)
if (solv->decisionmap[p] >= 0)
queue_push(dq, p);
+ for (j = 0; j < dq->count; j++)
+ {
+ Id p2 = dq->elements[j];
+ if (pool->solvables[p2].repo != installed)
+ continue;
+ d = specialupdaters[i - installed->start];
+ while ((p = pool->whatprovidesdata[d++]) != 0)
+ {
+ if (solv->decisionmap[p] >= 0 || pool->solvables[p].repo == installed)
+ continue;
+ if (solvable_identical(pool->solvables + p, pool->solvables + p2))
+ queue_push(dq, p); /* identical to installed, put it on the list so we have a repo prio */
+ }
+ }
if (dq->count && solv->update_targets && solv->update_targets->elements[i - installed->start])
prune_to_update_targets(solv, solv->update_targets->elements + solv->update_targets->elements[i - installed->start], dq);
if (dq->count)
Rule *r;
int origlevel = level;
Id p, *dp;
+ int focusbest = solv->focus_best && solv->do_extra_reordering;
+ Repo *installed = solv->installed;
/*
* decide
}
if (i == solv->nrules)
i = 1;
- if (solv->focus_best && solv->do_extra_reordering && i >= solv->featurerules)
+ if (focusbest && i >= solv->featurerules)
continue;
r = solv->rules + i;
if (r->d < 0) /* ignore disabled rules */
if (r->d == 0 || solv->decisionmap[-r->p] <= 0)
continue;
}
+ if (focusbest && r->d != 0 && installed)
+ {
+ /* make sure at least one negative literal is from a new package */
+ if (!(r->p < 0 && pool->solvables[-r->p].repo != installed))
+ {
+ dp = pool->whatprovidesdata + r->d;
+ while ((p = *dp++) != 0)
+ if (p < 0 && solv->decisionmap[-p] > 0 && pool->solvables[-p].repo != installed)
+ break;
+ if (!p)
+ continue; /* sorry */
+ }
+ }
if (dq->count)
queue_empty(dq);
if (r->d == 0)
name_s = s;
}
solver_addjobrule(solv, -p, 0, 0, i, weak);
+#ifdef ENABLE_LINKED_PKGS
+ if (solv->instbuddy && installed && s->repo == installed && solv->instbuddy[p - installed->start] > 1)
+ solver_addjobrule(solv, -solv->instbuddy[p - installed->start], 0, 0, i, weak);
+#endif
}
/* special case for "erase a specific solvable": we also
* erase all other solvables with that name, so that they
}
}
FOR_JOB_SELECT(p, pp, select, what)
- solver_addjobrule(solv, installed && pool->solvables[p].repo == installed ? p : -p, 0, 0, i, weak);
+ {
+ s = pool->solvables + p;
+ solver_addjobrule(solv, installed && s->repo == installed ? p : -p, 0, 0, i, weak);
+#ifdef ENABLE_LINKED_PKGS
+ if (solv->instbuddy && installed && s->repo == installed && solv->instbuddy[p - installed->start] > 1)
+ solver_addjobrule(solv, solv->instbuddy[p - installed->start], 0, 0, i, weak);
+#endif
+ }
if (solv->nrules != oldnrules)
haslockjob = 1;
break;