Bug 142651

Summary: RFE: --whatneeds feature missing
Product: [Fedora] Fedora Reporter: Abdelrahman Elsayed <fmuta>
Component: rpmAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora, matt, nfuhriman, pahan, pinto.elia, pmatilai, rhbugzilla, spider
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-10 10:53:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Abdelrahman Elsayed 2004-12-11 17:46:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20030630 Galeon/1.3.8

Description of problem:
[19:09] <estr4ng3d> "rpm -q --whatrequires xyz-package" says that no
package requires xyz. However, "rpm -e the-same-xyz-package" will
refuse to execute, reporting one or more package names as needing xyz.
What gives?
[19:10] jbj: -estr4ng3d: rpm -q --whatrequires `rpm -q --provides
xyz-package` is conceptually what you want
[19:11] <jbj> i.e. dependency relations are more complicated than
package dependencies, there are sonames, file paths, virtual provides,
more within the xyz-package container
[19:11] <jbj> rpm -q --provides --qf '%{name}'
[19:12] <jbj> is almost exatclt how to extract the tokens that are
used for dependency relations (there are still some details regarding
versioning that need some sdjustment)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.n/a
2.n/a
3.n/a
    

Additional info:

Comment 1 Jeff Johnson 2004-12-13 13:46:54 UTC
*** Bug 84176 has been marked as a duplicate of this bug. ***

Comment 2 Scott R. Godin 2004-12-13 20:56:34 UTC
this being a more recent report, should this not have been marked as a
duplicate of Bug 84176 and not the other way around ? 

Comment 3 Paul Nasrat 2005-11-28 21:28:28 UTC
*** Bug 156903 has been marked as a duplicate of this bug. ***

Comment 5 Red Hat Bugzilla 2007-08-21 05:19:23 UTC
User pnasrat's account has been closed

Comment 6 Panu Matilainen 2007-08-22 06:31:11 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 7 Scott R. Godin 2007-08-29 14:40:13 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=84176 should still, having been the 
first recorded instance of this report,  been the controlling instance -- the 
above recorded IRC conversation could  merely be tacked onto the end of it as 
continuing contribution to the description of 84176, whereas this report has 
recieved _no further response_.

Comment 8 Panu Matilainen 2007-08-30 07:53:47 UTC
There are many ancient bugs in need of response and action, working through them
is slow business :-/

This happens to be an old "favorite" of mine, having to resort to tricks like
$ rpm --provides -q vte | xargs rpm --whatrequires -q | grep -v no\ package | uniq

..seems silly as rpm is perfectly capable of doing a proper job. One way to do
fully depsolved "whatneeds" is 
$ rpm -e --test vte 2>&1|awk '{print $NF}'|uniq

...but that's still heavily in the ugly tricks department. OTOH these days you
can do this with repoquery (from yum-utils) too:
$ repoquery --pkgnarrow=installed --whatrequires --alldeps vte

That's still much more typing than one would hope though...

Comment 9 Scott R. Godin 2007-08-30 19:57:48 UTC
indeed. Well, as long as you're keeping Bug 84176 in consideration when you get 
to where you can follow up on this. The workaround suggestions you made above 
will help in the meantime though, at least for reference purposes.

Comment 10 John Poelstra 2008-07-04 04:26:01 UTC
triaged

Comment 11 Jeff Johnson 2008-07-07 15:12:04 UTC
And implemented.

A popt alias that looks like
    rpm alias --whatneeds --queryformat '[%{whatneeds}\n]'
is all that remains to be added.

Comment 12 Panu Matilainen 2008-12-11 06:37:23 UTC
*** Bug 475882 has been marked as a duplicate of this bug. ***

Comment 13 devzero2000 2009-01-12 16:03:49 UTC
FWIW, in the next @rpm5.org release, 5.1.7, that it will be released shortly, the functionality --whatneeds, --needwhats will be included.

Comment 15 devzero2000 2010-09-15 09:19:50 UTC
(In reply to comment #11)
> And implemented.
> 
> A popt alias that looks like
>     rpm alias --whatneeds --queryformat '[%{whatneeds}\n]'
> is all that remains to be added.

Implemented also in 

5.1.0 -> 5.2a0

Comment 16 devzero2000 2010-09-15 09:20:55 UTC
This RFE is tracked also on https://bugs.launchpad.net/rpm/+bug/638630

Comment 17 Fedora Admin XMLRPC Client 2012-04-13 23:11:48 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 18 Fedora Admin XMLRPC Client 2012-04-13 23:13:51 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 19 Panu Matilainen 2016-11-10 10:53:33 UTC
As for why closing the older bug as dupe, see https://bugzilla.redhat.com/show_bug.cgi?id=1393704#c3. Helps clearing out over a decades worth of  historical babbage of bugzilla administrativia, owner changes and whatnot.

So if you want to complain, complain here. But lets keep the new bug tidy please :)

*** This bug has been marked as a duplicate of bug 1393704 ***