On Thu, 2016-04-07 at 11:17 +0200, Michael Mraka wrote:
> Hi,
> 
> while trying to fix bug 1303311 I found out that output of
> --whatrequires is not (very well) defined for rich dependencies.
> I've already discussed it with Lubos K. but we come with couple
> of different solutions not sure which one is the best (or better
> say expected by admins).
> 
> So I'd like to know your opinion:
> What's the intended behavior 'rpm -q --whatrequires' querying rich deps?
> 
> An example to think about - have a package with following requires installed
>   richdep.spec:
>     Requires: A
>     Requires: B
>     Requires: (C and D)
>     Requires: (E or F)
>     Requires: (G if H else I)
> 
> Which of the following queries should include 'richdep' in the output?
>     rpm -q --whatrequires A
>     rpm -q --whatrequires B
> 
>     rpm -q --whatrequires C
>     rpm -q --whatrequires D
>     rpm -q --whatrequires '(C and D)'

 yes.

>     rpm -q --whatrequires E
>     rpm -q --whatrequires F

 If they are satisfied, yes, ideally.
 Returning yes all the time isn't terrible.

 In general I'd say it's pretty confusing to return something that's a
requirement of what's installed, but the thing that's required isn't
installed (and doesn't need to be). So while you can kind of explain
away why it's shown, it will be less useful and confusing to do so.

>     rpm -q --whatrequires '(E or F)'

 yes. As a rule I'd say that if the query matches what's in requires
identically you really better return it.

>     rpm -q --whatrequires G

 Yes, if H installed.

>     rpm -q --whatrequires H

 I would say no, but pretending it's ((G and H) or I) isn't terrible.

>     rpm -q --whatrequires I

 Yes, if not H installed.

>     rpm -q --whatrequires '(G if H)'

 I would say no, but yes isn't bad.

>     rpm -q --whatrequires '(G if H else I)'

 Yes, see above exact match.


_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to