[PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

Ken Brown kbrown@cornell.edu
Tue Jan 9 15:49:00 GMT 2018


On 1/9/2018 10:37 AM, Ken Brown wrote:
> On 1/9/2018 8:25 AM, Jon Turney wrote:
>> On 24/12/2017 15:00, Ken Brown wrote:
>>> On 12/13/2017 5:31 PM, Ken Brown wrote:
>>>> On 12/13/2017 1:05 PM, Achim Gratz wrote:
>>>>> Ken Brown writes:
>>>>>> 1. Uninstall A.
>>>>>> 2. Don't uninstall B.
>>>>>>
>>>>>> On the surface, it would seem that libsolv chose 2 by default, 
>>>>>> because
>>>>>> it returned an empty transaction list.  This was reflected in the log
>>>>>> and was also clear when I selected 'Back'.
>>
>> Yeah, I think what is actually happening here is that the solver returns
>> a partial solution, without the problematic transaction.
>>
>> But yeah, there's no real concept of a default solution, so (lacking a
>> UI to choose, which I think is a bit out of scope for the moment), it's
>> up to us to define one.
>>
>>>>> I don't think there is a default in this case.  I also see in zypper
>>>>> that the order of the proposed solutions (there can be way more than
>>>>> two
>>>>> if the dependencies are more complicated) is not always the same, so
>>>>> there is no preference implied by the order as well.
>>>>>
>>>>>> Maybe we have to deal with this situation ourselves.  Whenever a
>>>>>> problem involves a missing dependency, we could choose as default
>>>>>> solution the one that installs/keeps the dependent package, as is
>>>>>> currently done.
>>>>>
>>>>> That solution unfortunately isn't always the one that causes the least
>>>>> amount of transactions or even the least amount of breakage.
>>>>
>>>> That may be true, but I still think it's a reasonable default.  The
>>>> user doesn't have to accept it.  Also, it's consistent with what
>>>> setup currently does, so it won't surprise anyone.
>>>>
>>>> The attached patch attempts to implement my suggestion.
>>
>> I came up with a slightly different solution of just picking the first
>> solution as a default.
> 
> That's certainly easier than what I was trying to do.  If we do that, we
> should probably change the UI to remove the implication that the default
> solution is recommended.  For example, if A requires B and the user
> tries to uninstall B, the first solution seems to usually (always?) be
> "uninstall A".  This may or may not be what the user wants.
> 
> Maybe we should say something like, "By default, the first proposed
> solution will be selected for each problem.  If this is not what you
> want, press Back...."
> 
>> After solving problems we also need to consider the 'install source for
>> everything I install' flag, which unfortunately requires quite a bit of
>> refactoring.
>>
>> See attached.
> 
> I just did a quick test, trying to uninstall B in the situation above,
> and it didn't work as expected.  Even though "Uninstall A" was the first
> solution, A didn't get uninstalled.

In case you want to replicate this, what I actually tried was 
uninstalling ImageMagick, which is required, directly or indirectly, by 
asymptote, dblatex, and xmlto.  Solution 1 was to uninstall these three 
but it didn't happen.

Ken




More information about the Cygwin-apps mailing list