Thank you guys for your responses. Not surprisingly - different people, different expectations :).
Miroslav Suchy wrote: % In rpm I would like to have semantic "which package will stop working if I remove this package". % I.e. when I run: % rpm -e foo % then I will get some errors that foo cannot be removed because A,B and C requires it. % I would expect that --whatrequires gives me the same list (sans transitive requires). James Antill wrote: % 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. This is one of the possible semantics, let's call it "strict". Michael Schroeder wrote: % The current implementation returns packages that *potentially* break % if the package is deinstalled. Which is kind of opposite "loose" semantic - which packages have this dependency mentioned among its requires (in any expression). % > richdep.spec: % > Requires: A % > Requires: B % > Requires: (C and D) % > Requires: (E or F) % > Requires: (G if H else I) % > Seems that we all agree following 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 or F)' rpm -q --whatrequires '(G if H else I)' should definitely output "richdep". I also think we can agree that rpm -q --whatrequires '(G if H)' should output nothing as it's neither a single dependency nor an exact expression. And for the rest rpm -q --whatrequires E rpm -q --whatrequires F rpm -q --whatrequires G rpm -q --whatrequires H rpm -q --whatrequires I it depends on which strategy we will agree. It's either "richdep" for loose one or for strict one it depends on current rpmdb status. Here is couple of reasons why I'd prefer "loose" semantic: - Currently if there is a package with broken dep A (e.g. installed with rpm --nodeps) then --whatrequires A reports it. - Weak deps --whatsuggests, --whatrecommends, etc. As weak deps can naturally be unsatisfied and that's correct, the answer for rpm --whatsuggests A should report possible breakage not the currently installed packages. - And then there's dnf where 'dnf repoquery --whatrequires' also should report all (possibly) broken packages. 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. -- Michael Mráka Software Management Engineering, Red Hat _______________________________________________ Rpm-ecosystem mailing list Rpm-ecosystem@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-ecosystem