On 04/07/2016 11:17 AM, 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

To set the expectations right:

> Which of the following queries should include 'richdep' in the output?
>     rpm -q --whatrequires A

While this returns a complete list of packages with exactly matching
Requires it does not return a list of all packages that need to be
removed if A is deleted.

It is very much possible that other packages provide A. So to make sense
of this list you need to also run

rpm -q --whatprovides A

So the picture you can get by a single --whatrequires query is
incomplete at best.

Yes, this get's worse with rich dependencies. But the expectation cannot
be and should not be that these queries do some dependency solving
magic, but rather give an idea of the situation.

Florian

-- 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill
_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to