[packagekit] Adding a recursive flag to GetDepends and GetRequires

Sebastian Heinlein glatzor at ubuntu.com
Thu Nov 8 03:50:01 PST 2007

Am Donnerstag, den 08.11.2007, 09:23 +0100 schrieb Tim Lauridsen:
> Richard Hughes wrote: 
> > On Wed, 2007-11-07 at 15:19 -0500, Sebastian Heinlein wrote:
> >   
> > > What is the use case behind this feature? The list seems to be quite
> > > long in the end.
> > >     
> > 
> > Well, say I want to remove gimp. With no recursive, I will just be
> > informed of the immediate requires, and might not be informed of
> > something that the 1st level requires, require. If you see what I mean.
> > 
> > If gnome-power-manager depends on hal, and hal depends on glibc, then
> > with recursive i would get:
> > 
> > pkcon remove glibc
> > Removing glibc will also remove hal and gnome-power-manager, okay to
> > continue? [Y/n]
> > 
> > For recursive dependencies, I can see all the packages I would need on a
> > minimal install, although I agree the use case for this is less
> > convincing than the former case.

> I have an idea of another way to make this happen.
> What about adding adding a 'show-transaction' flag to
> remove,update,install.
> if show-transaction is True, then the remove,update,install will
> return the packages about to be installed,updates,removed,obsoleted,
> but don't process the transaction.
> if show-transaction is False then the transaction will be processed as
> today.
> When the gui, cli can first call the 'remove' with show-transaction =
> True  and get the packages to be processed, ask for a confirmation
> and call 'remove' again with show-transaction=True to perform the
> transaction.
> This way should be easier to implement for most backend, because this
> is how they normally work.
> * Add some actions/packages to the Transaction
> * Resolve dependencies.
> * Ask for confirmation
> * Process the Transaction.
> This is even more useful if we want to extend to take more than one
> package id as an argument.
> pkcon remove foo bar zoo

I think that this is a better approach. Sometime installing a package
also requires to update other packages or to remove other. Furthermore
the required changes should be calculated by the backend and not the
frontend. If you use GetRequires you would have to check for installed
requirements. In the end you would move the resolver to PackageKit.

A kind of callback would perhaps be a better way.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071108/818bafde/attachment-0004.pgp>

More information about the PackageKit mailing list