From: Michael Schroeder Date: Thu, 13 Jun 2019 14:07:46 +0000 (+0200) Subject: Extend the job to the install buddy for erase and lock jobs X-Git-Tag: 0.7.6~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=875df844b8adbf55afe8efff9da2dfae5fe6140f;p=thirdparty%2Flibsolv.git Extend the job to the install buddy for erase and lock jobs This is needed so that a cleandeps erase of a pattern propagates to the packages, as pattern packages are automagically marked as userinstalled. --- diff --git a/src/solver.c b/src/solver.c index e7a9dc06..a79d4e34 100644 --- a/src/solver.c +++ b/src/solver.c @@ -3858,6 +3858,10 @@ solver_solve(Solver *solv, Queue *job) 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 @@ -3925,7 +3929,14 @@ solver_solve(Solver *solv, Queue *job) } } 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;