[packagekit] Adding a recursive flag to GetDepends and GetRequires

Tim Lauridsen tim.lauridsen at googlemail.com
Thu Nov 8 00:23:38 PST 2007

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.
> Richard.
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
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 

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071108/75220415/attachment-0003.htm>

More information about the PackageKit mailing list