setup libsolv UI: Silently install dependencies?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

setup libsolv UI: Silently install dependencies?

Ken Brown-6
Currently the libsolv version of setup silently installs added
dependencies.  The user gets a chance to review them first only if
libsolv finds problems and has to display the prerequisite page.

I'm not sure if this was a deliberate design decision, though I
personally like it.  On the other hand, I suspect that some users won't
like it because they're used to seeing a report about missing
dependencies.  So I think we should make this behavior optional.

The attached patch is a start in that direction.  But it needs a
followup patch to implement the mechanism for selecting the option.  One
possibility is a checkbox on the chooser page, which then gets saved in
setup.rc as a user option.  Are there other suggestions?

Ken

0001-Let-the-user-review-added-dependencies.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Ken Brown-6
On 12/24/2017 6:23 PM, Ken Brown wrote:

> Currently the libsolv version of setup silently installs added
> dependencies.  The user gets a chance to review them first only if
> libsolv finds problems and has to display the prerequisite page.
>
> I'm not sure if this was a deliberate design decision, though I
> personally like it.  On the other hand, I suspect that some users won't
> like it because they're used to seeing a report about missing
> dependencies.  So I think we should make this behavior optional.
>
> The attached patch is a start in that direction.  But it needs a
> followup patch to implement the mechanism for selecting the option.  One
> possibility is a checkbox on the chooser page, which then gets saved in
> setup.rc as a user option.
And here's a followup patch that implements that possibility.

[Side comment: Jon, in v2 of commit 9367283, you removed some newlines,
saying that they weren't needed because wrapping would be done.  But I'm
not seeing that wrapping; I have to scroll horizontally to see the whole
text.]

Ken


0001-Implement-user-option-to-report-added-dependencies.patch (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Jon TURNEY
In reply to this post by Ken Brown-6
On 24/12/2017 23:23, Ken Brown wrote:
> Currently the libsolv version of setup silently installs added
> dependencies.  The user gets a chance to review them first only if
> libsolv finds problems and has to display the prerequisite page.
>
> I'm not sure if this was a deliberate design decision, though I
> personally like it.  On the other hand, I suspect that some users won't
> like it because they're used to seeing a report about missing
> dependencies.  So I think we should make this behavior optional.

Yeah.  Ideally we'd show what we're going to do, before we do it.

This is a bit more complex than before, as the solver might decide to
remove or upgrade packages, rather than just install extra ones.

> The attached patch is a start in that direction.  But it needs a
> followup patch to implement the mechanism for selecting the option.  One
> possibility is a checkbox on the chooser page, which then gets saved in
> setup.rc as a user option.  Are there other suggestions?

But, somewhat confused by this.  Isn't this just going to show the
(empty) problem report?

Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Ken Brown-6
On 1/5/2018 10:48 AM, Jon Turney wrote:

> On 24/12/2017 23:23, Ken Brown wrote:
>> Currently the libsolv version of setup silently installs added
>> dependencies.  The user gets a chance to review them first only if
>> libsolv finds problems and has to display the prerequisite page.
>>
>> I'm not sure if this was a deliberate design decision, though I
>> personally like it.  On the other hand, I suspect that some users
>> won't like it because they're used to seeing a report about missing
>> dependencies.  So I think we should make this behavior optional.
>
> Yeah.  Ideally we'd show what we're going to do, before we do it.
>
> This is a bit more complex than before, as the solver might decide to
> remove or upgrade packages, rather than just install extra ones.
>
>> The attached patch is a start in that direction.  But it needs a
>> followup patch to implement the mechanism for selecting the option.  
>> One possibility is a checkbox on the chooser page, which then gets
>> saved in setup.rc as a user option.  Are there other suggestions?
>
> But, somewhat confused by this.  Isn't this just going to show the
> (empty) problem report?

No, it shows a report that says, "Click Back and select the Pending view
to review the default problem solutions, including packages that were
added to resolve dependencies."  This isn't ideal, because it forces the
user to select 'Back', and even then the user can't see explicitly why
packages were added.  It would be better if we could get libsolv to give
us a report about added dependencies.  Do you know if this is possible?

Ken


Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Jon TURNEY
In reply to this post by Ken Brown-6
On 25/12/2017 19:18, Ken Brown wrote:
> [Side comment: Jon, in v2 of commit 9367283, you removed some newlines,
> saying that they weren't needed because wrapping would be done.  But I'm
> not seeing that wrapping; I have to scroll horizontally to see the whole
> text.]

Yeah, what I wrote was nonsense.

I think it's a bit visually inconsistent to put fixed linebreaks into
this text.  I think it would be more consistent to either (i) wrap at
the width of the edittext control, or (ii) not wrapped at all (like the
problems)

I'm not sure if (ii) is achievable, though (perhaps with an
EditWordBreakProc function?).

Or maybe just remove the hscroll style so everything gets wrapped?

I think I'll just put it back the way you had it, for the moment.
Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Jon TURNEY
In reply to this post by Ken Brown-6
On 05/01/2018 16:04, Ken Brown wrote:

> On 1/5/2018 10:48 AM, Jon Turney wrote:
>> On 24/12/2017 23:23, Ken Brown wrote:
>>> Currently the libsolv version of setup silently installs added
>>> dependencies.  The user gets a chance to review them first only if
>>> libsolv finds problems and has to display the prerequisite page.
>>>
>>> I'm not sure if this was a deliberate design decision, though I
>>> personally like it.  On the other hand, I suspect that some users
>>> won't like it because they're used to seeing a report about missing
>>> dependencies.  So I think we should make this behavior optional.
>>
>> Yeah.  Ideally we'd show what we're going to do, before we do it.
>>
>> This is a bit more complex than before, as the solver might decide to
>> remove or upgrade packages, rather than just install extra ones.
>>
>>> The attached patch is a start in that direction.  But it needs a
>>> followup patch to implement the mechanism for selecting the option.
>>> One possibility is a checkbox on the chooser page, which then gets
>>> saved in setup.rc as a user option.  Are there other suggestions?
>>
>> But, somewhat confused by this.  Isn't this just going to show the
>> (empty) problem report?
>
> No, it shows a report that says, "Click Back and select the Pending view
> to review the default problem solutions, including packages that were
> added to resolve dependencies."  This isn't ideal, because it forces the
> user to select 'Back', and even then the user can't see explicitly why
> packages were added.  It would be better if we could get libsolv to give

Ah, right.

> us a report about added dependencies.  Do you know if this is possible?

Hmmm.. there's the SOLVER_USERINSTALLED flag we can apply to a task.
Perhaps that is passed through, so we can see what's been installed
directly vs. dependencies.

Otherwise I guess you could to compare input and output task lists to
see what has been added by the solver?

I'm not sure it's ideal to make a text report of this, though.
Displaying it in the chooser somehow seems a better fit.

(i.e. after you've made your selections, you get something like the
"pending" view in the chooser again, showing what will be done, which
you can either confirm or go back from)
Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Ken Brown-6
On 1/9/2018 8:32 AM, Jon Turney wrote:

> On 05/01/2018 16:04, Ken Brown wrote:
>> On 1/5/2018 10:48 AM, Jon Turney wrote:
>>> On 24/12/2017 23:23, Ken Brown wrote:
>>>> Currently the libsolv version of setup silently installs added
>>>> dependencies.  The user gets a chance to review them first only if
>>>> libsolv finds problems and has to display the prerequisite page.
>>>>
>>>> I'm not sure if this was a deliberate design decision, though I
>>>> personally like it.  On the other hand, I suspect that some users
>>>> won't like it because they're used to seeing a report about missing
>>>> dependencies.  So I think we should make this behavior optional.
>>>
>>> Yeah.  Ideally we'd show what we're going to do, before we do it.
>>>
>>> This is a bit more complex than before, as the solver might decide to
>>> remove or upgrade packages, rather than just install extra ones.
>>>
>>>> The attached patch is a start in that direction.  But it needs a
>>>> followup patch to implement the mechanism for selecting the option.
>>>> One possibility is a checkbox on the chooser page, which then gets
>>>> saved in setup.rc as a user option.  Are there other suggestions?
>>>
>>> But, somewhat confused by this.  Isn't this just going to show the
>>> (empty) problem report?
>>
>> No, it shows a report that says, "Click Back and select the Pending
>> view to review the default problem solutions, including packages that
>> were added to resolve dependencies."  This isn't ideal, because it
>> forces the user to select 'Back', and even then the user can't see
>> explicitly why packages were added.  It would be better if we could
>> get libsolv to give
>
> Ah, right.
>
>> us a report about added dependencies.  Do you know if this is possible?
>
> Hmmm.. there's the SOLVER_USERINSTALLED flag we can apply to a task.
> Perhaps that is passed through, so we can see what's been installed
> directly vs. dependencies.
>
> Otherwise I guess you could to compare input and output task lists to
> see what has been added by the solver?
>
> I'm not sure it's ideal to make a text report of this, though.
> Displaying it in the chooser somehow seems a better fit.
>
> (i.e. after you've made your selections, you get something like the
> "pending" view in the chooser again, showing what will be done, which
> you can either confirm or go back from)

Yes, that does seem better.

Ken

Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Ken Brown-6
In reply to this post by Jon TURNEY
On 1/9/2018 8:32 AM, Jon Turney wrote:
> I'm not sure it's ideal to make a text report of this, though.
> Displaying it in the chooser somehow seems a better fit.
>
> (i.e. after you've made your selections, you get something like the
> "pending" view in the chooser again, showing what will be done, which
> you can either confirm or go back from)

Here's another attempt, lightly tested, which might still need some
improvements.  It goes back to the chooser, but it doesn't set the
pending view.  I'm not sure how to do that without a lot of refactoring,
but maybe I'm missing something easy.

Ken

0001-Let-the-user-review-added-dependencies.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setup libsolv UI: Silently install dependencies?

Ken Brown-6
On 1/15/2018 12:31 PM, Ken Brown wrote:

> On 1/9/2018 8:32 AM, Jon Turney wrote:
>> I'm not sure it's ideal to make a text report of this, though.
>> Displaying it in the chooser somehow seems a better fit.
>>
>> (i.e. after you've made your selections, you get something like the
>> "pending" view in the chooser again, showing what will be done, which
>> you can either confirm or go back from)
>
> Here's another attempt, lightly tested, which might still need some
> improvements.  It goes back to the chooser, but it doesn't set the
> pending view.

I've added code that allows the PrereqChecker to set the pending view
before going back.  I'll send a revised patch shortly.

Ken