Bug 713412 - package-cleanup fails to find all leaves
package-cleanup fails to find all leaves
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
14
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-15 06:44 EDT by Ian Dall
Modified: 2014-01-21 18:18 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-15 06:59:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ian Dall 2011-06-15 06:44:40 EDT
Description of problem:
"package-cleanup -q --leaves --all" fails to find all the packages which are not depended upon by other packages

Version-Release number of selected component (if applicable):
yum-utils-1.1.28-1.fc14.noarch

How reproducible:
Always (I only see this on some packages. I have no idea if this depends on the order in which things were originally installed).

Steps to Reproduce:
1.yum install xfig
2.package-cleanup -q --leaves --all | grep xfig
3.
  
Actual results:
nothing


Expected results:
"xfig-3.2.5-25.b.fc14.i686"

Additional info:
"rpm -q xfig" gives xfig-3.2.5-25.b.fc14.i686 and
"rpm -q --whatdepends xfig" shows nothing, so would definitely expect that xfig is a leaf. This is not xfig specific. I see the same with ktorrent. Who knows how many others. If I had an easy way to tell how many other leaves I have I wouldn't need to use "package-cleanup"!
Comment 1 Panu Matilainen 2011-06-15 06:59:55 EDT
"rpm -q --whatrequires <foo>" only shows direct dependencies on capability <foo>, not everything that depends on something that package <foo> provides. This is a fairly common source of confusion... "rpm -e --test <foo>" will show the package-level dependency situation.

In case of xfig, there's xfig-common package which depends on virtual "xfig-executable" provide, provided by both xfig and xfig-plain. So package-cleanup is right, xfig is not a leafnode because there's another package depending on it.
Comment 2 James Antill 2011-06-15 10:25:16 EDT
ktorrent has a similar problem with ktorrent-libs.

in both cases it should be possible to fix the packaging so that they are leaf nodes. working around this in package-cleanup might be possible ... but is far from easy. Patches accepted, etc.
Comment 3 Ian Dall 2011-06-15 19:42:12 EDT
Thanks for that. xfig-common isn't a leaf either as xfig depends on it. So there is a circular dependency. I agree that this is not a bug as such. I'm not sure that there is anything wrong with circular dependencies either, but it sure limits the usefulness of package-cleanup --leaves.

Note You need to log in before you can comment on or make changes to this bug.