Bug 445773 - Problem in "yumdownloader --resolve gcc" resulting in a Python traceback
Summary: Problem in "yumdownloader --resolve gcc" resulting in a Python traceback
Keywords:
Status: CLOSED DUPLICATE of bug 391791
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-utils
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: James Antill
URL: http://lists.centos.org/pipermail/cen...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-09 00:47 UTC by Filipe Brandenburger
Modified: 2008-05-09 04:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-09 04:51:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Filipe Brandenburger 2008-05-09 00:47:28 UTC
Description of problem:

There is a Python bug in yumdownloader that triggers with the command
"yumdownloader --resolve gcc". The problem was identified on CentOS, but it is
clearly a Python bug. There is one line of Python that tests "if other == None"
when the correct is using the "is" operator, testing "if other is None".

The URL I posted is to the message in CentOS mailing list where the problem was
identified.



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

1.0.4-3



How reproducible:

Always



Steps to Reproduce:
1. yum install yum-utils
2. yumdownloader --resolve gcc
  


Actual results:

# yumdownloader --resolve gcc
Loading "priorities" plugin
Loading "installonlyn" plugin
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Updates
Finished
263 packages excluded due to repository priority protections
Traceback (most recent call last):
 File "/usr/bin/yumdownloader", line 191, in ?
  main()
 File "/usr/bin/yumdownloader", line 159, in main
  if not pkg in toDownload:
 File "/usr/lib/python2.4/site-packages/yum/packages.py", line 191, in __eq__
  if other == None:
 File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 403, in
__cmp__
  if self.name > other.name:
AttributeError: 'NoneType' object has no attribute 'name'
#



Expected results:

# yumdownloader --resolve gcc
Loading "installonlyn" plugin
gcc-4.1.2-14.el5.x86_64.r 100% |=========================| 5.3 MB    00:10     



Additional info:

In line 191 of packages.py, the "is" operator should be used instead
of "==". The line should read:

       is other is None:

I changed my file and after that it worked fine.

Comment 1 James Antill 2008-05-09 04:51:34 UTC

*** This bug has been marked as a duplicate of 391791 ***


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