Bug 713412 - package-cleanup fails to find all leaves
Summary: package-cleanup fails to find all leaves
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 10:44 UTC by Ian Dall
Modified: 2014-01-21 23:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-15 10:59:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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