[packagekit] filters usage in get-depends / get-requires and install-packages (was: get-depends and get-requires probably shouldn't use an array of package_ids)

Mounir Lamouri mounir.lamouri at gmail.com
Fri Jul 10 02:50:37 PDT 2009


On Fri, Jul 10, 2009 at 11:28 AM, Richard Hughes<hughsient at gmail.com> wrote:
> 2009/7/10 Mounir Lamouri <mounir.lamouri at gmail.com>:
>> So you are saying if I use filter=installed;~free;newest, showed
>> packages should be only installed, non-free and newest. If they are
>> not, they are not shown ? Seems weird to me.
>
> Filters were always designed to reduce the number of returned
> packages, rather than change the behaviour of how the results are
> generated.
>
>> But, newest is to see only newest depends ?
>
> GetDepends(a,b)
>
> If a depends on c >= 0.34 and b depends on c >= 0.60 then with newest
> we should only show c 0.60
Ok for newest. My bad, it is not removing packages but it is only
showing newest packages if there are more than one version. I was
confused because it's so natural it doesn't seem to need a filter.
But that's probably PM-related. portage always install newest
available version of a package so except for updates, newest is
somewhat always enabled.

>> I even think it's very bad for the user. If I have filter=free;newest
>> and because of that, when I want to install foo package it is only
>> showing half of packages that are going to be installed, I think it's
>> confusing...
>
> Well, this is why installing multiple versions of things is often a
> bad idea from a usability point of view. FWIW, I don't think any of
> the GUI users of the GetDepends() function use newest at the moment.
I'm not sure I was clear.
We should forget newest filter here and let consider filter=free
I want to install foo and foo depends on a and b. foo and a are free
but b isn't.
According to what I understand from previous discussion,
GetDepends(foo, "free") should returns:
a
And b will be avoided. Isn't that weird ?

Mounir



More information about the PackageKit mailing list