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"!
"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.
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.
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.