On 15/09/2017 17:53, Ken Brown wrote:
On 9/15/2017 11:15 AM, Jon Turney wrote:
On 08/09/2017 19:54, Ken Brown wrote:
Finally, I have a question for you, Jon: You introduced
PrereqChecker::upgrade, which is true if and only if the user
selects Current or Test. I don't see why this is needed. I've
disabled the use of it and haven't noticed any ill effects. Am I
missing something?
This is supposed to be passed into SolverSolution::update() and used
to determine if a SOLVER_UPDATE | SOLVER_SOLVABLE_ALL task is given
to the solver, causing all packages to be updated (if possible) (i.e.
so 'Keep' doesn't update anything)
I've already arranged (by using SOLVER_LOCK) that 'Keep' doesn't
update anything. So I don't think we need to worry about that case.
On the other hand, if 'Current' or 'Test' is selected, then we already
upgrade as appropriate in the task list sent to the solver, so I don't
think it's necessary to send SOLVER_UPDATE | SOLVER_SOLVABLE_ALL to
the solver in that case either.
Yeah, I see. Sigh.
If we select 'curr', then the latest version of all installed packages
is selected by the picker and will be shown in the pending view, and
gets fed into the solver.
I guess this is technically wrong: really we should ask the solver to do
SOLVER_UPDATE | SOLVER_SOLVABLE_ALL, which will come up with a solution
which updates all installed packages to the latest possible version,
subject to any other constraints which exist.
I suspect there's no difference between these two at the moment, though.
Not sure how to do this properly, though.