Bug 456062 - AssertionError with package-cleanup --leaves
AssertionError with package-cleanup --leaves
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-07-21 06:33 EDT by John Smith
Modified: 2008-09-10 03:05 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-21 17:05:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Smith 2008-07-21 06:33:56 EDT
Description of problem:
the command "package-cleanup --leaves" fails with AssertionError

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

How reproducible:
always reproducible on my system

Steps to Reproduce:
type: package-cleanup --leaves --exclude-devel
(also fails without --exclude-devel)
Actual results:
Setting up yum
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 449, in <module>
  File "/usr/bin/package-cleanup", line 422, in main
    opts.exclude_devel, opts.exclude_bin)
  File "/usr/bin/package-cleanup", line 235, in listLeaves
  File "/usr/bin/package-cleanup", line 214, in _shouldShowLeaf
    assert len(pos) == 1

Additional info:
"package-cleanup --problems" works fine and says "No problems found".
I have also tried "yum clean all" before running package-cleanup.
Comment 1 seth vidal 2008-07-21 08:54:52 EDT
what version of yum are you using here?
Comment 2 John Smith 2008-07-21 09:04:13 EDT
using yum-3.2.8-2.fc8
Comment 3 John Smith 2008-07-21 17:00:44 EDT
I just realized package-cleanup is python.  After adding a suitable print
command, I found that "package-cleanup --leaves" fails when it encounters
gpg-pubkey.  More precisely, at the point where it fails, the variable pkg

pkg[0]: gpg-pubkey
pkg[1]: None
pkg[2]: 0
pkg[3]: a109b1ec
pkg[4]: 3f6e28d5

Just in case this might help.
Comment 4 seth vidal 2008-07-21 17:05:21 EDT
Yes, this does help. In later versions of yum we've excluded those packages from
look ups like this. I can make sure that package-cleanup steps around this in
the meantime and if/when we release an update for yum for F8 it will be fixed
there, too.

Comment 5 Fedora Update System 2008-08-07 10:00:07 EDT
yum-utils-1.1.15-1.fc9 has been submitted as an update for Fedora 9
Comment 6 Fedora Update System 2008-08-07 10:05:52 EDT
yum-utils-1.1.15-1.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-09-10 02:47:29 EDT
yum-utils-1.1.15-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2008-09-10 03:05:04 EDT
yum-utils-1.1.15-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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