Bug 713412

Summary: package-cleanup fails to find all leaves
Product: [Fedora] Fedora Reporter: Ian Dall <ian>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: james.antill, maxamillion, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-15 10:59:55 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 Ian Dall 2011-06-15 10:44:40 UTC
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 10:59:55 UTC
"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 14:25:16 UTC
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 23:42:12 UTC
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.