[packagekit] Dependencies resolution

Richard Hughes hughsient at gmail.com
Tue Jul 14 04:05:28 PDT 2009


2009/7/13 Sebastian Heinlein <glatzor at ubuntu.com>:
> I agree that this is really a problem. Also think about the case if an
> update requires additional packages to be installed. This happens from
> time to time and currently there is no way to install these security
> updates with (k)packagekit.

Right, that's a bug in the apt backend then. The yum backend installs
deps automatically if the update requires.

>> Richard proposed guessing getDepends when recursive is enabled
>> and emit packages to be removed however in src/pk-transaction.c:823
>> it simply drops the package (which imo it's a bit of duplication since
>> we should already do that in the backend).
>
> What was Richards statement here exactly? Sorry but I don't fully
> understand the above abstract.

Well, at the moment the update viewer just calls
GetDepends(~installed, recursive) with the list of updates, to be able
to detect any other packages that need to be installed for deps.
Daniels idea is to emit the removal packages in the GetDepends call,
which might work but is very much an architectural cludge.

>> My idea them as Richard don't want to break API with "simulate_install"
>> and alike, is to add three new filters (with better naming):
>>
>> PK_FILTER_ENUM_TO_INSTALL
>> PK_FILTER_ENUM_TO_REMOVE
>> PK_FILTER_ENUM_TO_UPDATE
>
> I don't see any need to add any additional filters or enums. There is
> already a set of enums to indicate a changing state:
> PK_ENUM_INFO_(INSTALLING|REMOVING|UPDATING)

Agree. Filters were'nt designed for this, and it's going to make
things very confusing if filters start magically changing how a method
operates.

> Richard, I would propose to change the convention of GetRequires and
> GetDepends here. Updates should be covered by the GetDepends call with
> the version number of update.

How do you mean?

> In the long run having better named methods could help. I always have to
> think about the behavior of GetRequires and GetDepends.

Well, I always remember it as follows:

hal depends on libc
hal is required by gnome-power-manager

Maybe renaming GetRequires to GetRequiredBy might make it clearer, but
I don't think it's work breaking API for.

Richard.



More information about the PackageKit mailing list