[packagekit] PackageKit & Debian, Was: External dependencies, DeviceKit-power and GNOME Power Manager

Richard Hughes hughsient at gmail.com
Wed Nov 26 05:23:54 PST 2008


On Wed, 2008-11-26 at 13:24 +0100, Martin Pitt wrote:
> Richard Hughes [2008-11-26 11:25 +0000]:
> > What sort of questions do you want to ask the user? 
> 
> A typical question is the one for an administrator password when
> installing things like mysql or a wiki.

I don't think this is a install time thing, it's a configure time thing.
I think in this case the best thing to do would be to use Message(),
something like this:
________________________________________________________________
|
|  Password Required
|
|  A default password is required for the 'mediawiki' package.
|  This needs to be set in /etc/mediawiki/defaults before
|  the service is able to be used.
|_______________________________________________________________

I really don't think this is required at install time, these messages
can be queued up and shown at the end of the transaction. There's
certainly no need to block, waiting for input.

> Another is if the admin modified a configuration file, and a new
> package version also ships a different one than before. This sort of
> conflict can't be resolved automatically, but needs admin intervention
> (typical answers: keep mine (default), use new version from distro,
> show diff, start shell, some packages also allow a 3-way merge).

If we allow this kind of interaction, then we forbid the unattended
update use case. If the user walks away and leaves the PC on, the screen
locks. The session schedules an update. The update happens, and the
package manager puts up a prompt.

A new user comes in, and fast-user-switches to a new desktop. New user
tries to install a codec for a media player, which hangs at "Waiting for
other tasks" as the dialog in the first user session has blocked the
transaction.

I do think this problem is solvable tho:
________________________________________________________________
|
|  File conflict needs to be resolved
|
|  Updating samba-server has modified the /etc/samba.conf file
|  which has user modifications.
|
|  [ Ignore ] [ Show more information ]
|_______________________________________________________________

This again can be shown at the end of the transaction, and the "more
information" box can call a helper script, something like
pk-resolve-file-conflict.sh.

This can prompt the user with a full merge GUI, or just use a simple
zenity based solver. The fact that debconf asks you mid-transaction is
an implementation detail, rather than something that needs to dictate
the end user interactions required.

> The problem is that above profiles don't include users which are
> experienced with Unix/Linux administration, or even just users who
> know how to, and do, backup /etc/, for example. If you say "PK is just
> for non-technical users", then you will always need to keep a more
> advanced package management tool which can only use rpm or dpkg directly.

I'm not aiming to replace apt-get, aptitude, yum or any other native
tool; There will always be things that PK cannot do and the distro tool
will always be faster, more complete, and more interactive than what
PackageKit is able to do.

PackageKit doesn't aim to 100% replace all package management tasks for
all types of users. Trying to do that would be pretty insane as all the
backends are quite different.

> This is why I'd also like to see this kind of "user interaction" built
> into the protocol

If it blocks the transaction, it just can't happen. If we can do it
before (EULA), after (file conflicts), or are able to restart (GPG
import) then it's possible to do with PackageKit.

I might sound like an asshole here, but I'm not going to be bullied into
putting functionality in which blocks a transaction.

> So far I can e. g. use PK in jockey, our device
> driver package management tool, to keep it reasonably distro agnostic
> in the upstream branch (as discussed in the LinuxFoundation
> workgroup), but it currently puts a heavy limitation on what kind of
> packages you can install with it in dpkg based distros.

I'm not sure what questions you would ever need to ask for jockey. Have
you got any examples?

Richard.





More information about the PackageKit mailing list