Dne 7.4.2016 v 11:17 Michael Mraka napsal(a):
> I'd like to hear your unbiased opinion that's why I don't include
> neither my preferences nor current rpm behavior for now.
>
> 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)'
> 
>     rpm -q --whatrequires E
>     rpm -q --whatrequires F
>     rpm -q --whatrequires '(E or F)'
>     rpm -q --whatrequires G
>     rpm -q --whatrequires '(G if H)'
>     rpm -q --whatrequires '(G if H else I)'

The current implementation returns packages that *potentially* break
if the package is deinstalled. I.e. all of

    rpm -q --whatrequires A
    rpm -q --whatrequires B
    rpm -q --whatrequires C
    rpm -q --whatrequires D
    rpm -q --whatrequires E
    rpm -q --whatrequires F
    rpm -q --whatrequires G

return "richdep". I think that's the correct behaviour, but I'm biased
as I implemented it ;)

(I think that "--whatrequires '(G if H else I)'" also gives you an answer,
but it does an exact string match.)

Cheers,
  Michael.

-- 
Michael Schroeder                                   m...@suse.de
SUSE LINUX GmbH,           GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to