On Mon, Apr 11, 2016 at 01:19:30PM +0200, Michael Schroeder wrote: > On Mon, Apr 11, 2016 at 12:53:35PM +0200, Michael Mraka wrote: > > So to make things consistent I'd propose to fix > > rpm -q --whatrequires H > > which currently returns "none". And fix --whatsuggests, --whatrecommends, > > etc. > > to work the same way. > > Wait, don't make "rpm -q --whatrequires H" return richdep if richdep > contains > Requires: (G if H else I) > > The H package is on the "if" side, so it is not required. Either > G or I is required. Putting H in the requires index (that's what > you propose) will just mess up rpm's dependency solving.
Hmm, spoke too soon. I guess this is indeed a bug in rpm. It's true that for Requires: (G if H) 'G' and '!H' is put in the index, so that 'rpm -q --whatrequires G' will return 'richdep' and 'rpm -q --whatrequires !H' will also return richdep. But Requires: (G if H else I) is the same as Requires: (G if H) Requires: (I or H) so *both* 'H' and '!H' need to be in the index. I.e., if we remove H we need to make sure that I is installed and if we install H we need to make sure that G is installed. 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