[packagekit] Adding a recursive flag to GetDepends and GetRequires

Sebastian Heinlein glatzor at ubuntu.com
Wed Nov 7 12:19:44 PST 2007


Am Mittwoch, den 07.11.2007, 18:42 +0000 schrieb Richard Hughes:
> Guys,
> 
> I'm about to commit a patch which adds a boolean flag "recursive" to the
> GetDepends and GetRequires method.
> 
> >From the description in the developer documentation:
> 
> GetRequires:
> If recursive is true: This means if gnome-power-manager depends on
> NetworkManager and NetworkManager depends on HAL, then GetRequires on
> HAL should return both gnome-power-manager and NetworkManager.
> 
> GetDepends:
> If recursive is true: This means if gnome-power-manager depends on
> NetworkManager and NetworkManager depends on HAL, then GetDepends on
> gnome-power-manager should return both HAL and NetworkManager.
> 
> Why does this belong in the backends? Well, I tried doing this with lots
> of recursive calls to GetRequires(package_id) and for "gimp" it took a
> long time, when in yum took a few seconds. The backend doesn't have to
> do all this IPC, and so can do it much quicker.
> 
> If your backend can't do a recursive GetDepends or GetRequires, just
> ignore the flag; anything is better than nothing.
> 
> I've done my best to compile-fix all the backends, although I've
> probably broken something. Could you backend dudes please make sure
> everything still works, and add the new feature if you get a few
> minutes.
> 
> Adding this means we can do the right thing in pkcon and pk-application
> eventually, and present the user with a _sane_ warning box or command
> line error, with the option to continue and perform the action.
> 
> Thanks,
> 
> Richard.

What is the use case behind this feature? The list seems to be quite
long in the end.
-------------- 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/20071107/65685058/attachment-0004.pgp>


More information about the PackageKit mailing list