[packagekit] User Interaction needed

Patryk Zawadzki patrys at pld-linux.org
Wed Mar 12 11:50:34 PDT 2008


On Wed, Mar 12, 2008 at 7:04 PM, Richard Hughes <hughsient at gmail.com> wrote:
> On Wed, 2008-03-12 at 16:59 +0100, Stefan Haas wrote:
>  > there are a lot of places where it would be very useful (at least in the
>  > zypp-backend) to have any kind of possibility to interact with the user
>  > (like the already discussed media change issue).
>
>  What kind of interaction? I've specified before in
>  http://www.packagekit.org/pk-faq.html that mandatory general input is a
>  very bad thing to do to be able to meet our primary use cases. Could you
>  specify a list of questions you need to ask the user?

Sane but can pose a problem to some distros. We never use interactive
installation but others do.

May I ask for some other sort of interaction? Let the backend log
events by capturing the output of transaction. What I seek is a way
for an upgrade or installation script to tell the user or admin about
some further steps required. Just capturing the output and having the
transaction viewer display an icon when there is a log available (and
read the log) would be enough. It's not super critical for the general
use case but certainly an important thing when upgrading system
services (the user is able to do so within the GUI but some services
might need manual config checks after major version changes or even
manual data import/export). It's hard to put such information in a
different yet intuitive and equally reachable place.

>  As for the media query, I think it's sane to do this at the beginning of
>  a transaction if required, but I really don't think we can ask the user
>  to change CD's half way through. For example:

What about installations spanning multiple discs? It's safe to assume
that at one point you will need to swap the media. I don't think
that's a bad idea as such installs/upgrades are likely to be attended
(as opposed to moving all data to a network share when doing a wide
installation/upgrade).

>  pkcon install openoffice
>  installing openoffice-bin
>  installing openoffice-common
>  installing openoffice-clipart
>  >Please insert CDROM 2 for extra packages to be installed
>
>  Now, what if I can't find CDROM 2 at this point? The transaction is half
>  finished... Does zypp then rollback the changes as if the first CD had
>  not been inserted? Or are the files copied off disk first and then the
>  transaction run? If the latter is true then we can do this as part of
>  the checks for the transaction, although we would have to requeue this
>  twice in the client tool.

In case of rpm all the files need to be available at the transaction
commit time so I would expect most tools to copy the needed ones
locally before asking you to switch media.

>  > Another issue: When you've to choose between methods of resolution while
>  > installing/removing/updating a package (assumed there is no simple way
>  > to just do it), the zypp-backend  simply fails at the moment.
>  You mean if there are two packages both with a virtual provide, which
>  does the backend choose? You have to bear in mind: does the user
>  _actually_ care? Think primary use cases rather than a replacement to
>  the zypp command line tool.

Smart does a decent job here as it uses a weighted algorithm to pick
the least invasive path without asking the user.

-- 
Patryk Zawadzki
PLD Linux Distribution



More information about the PackageKit mailing list