Bug 445773

Summary: Problem in "yumdownloader --resolve gcc" resulting in a Python traceback
Product: Red Hat Enterprise Linux 5 Reporter: Filipe Brandenburger <filbranden>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED DUPLICATE QA Contact: James Antill <james.antill>
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://lists.centos.org/pipermail/centos/2008-May/098782.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-09 04:51:34 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 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 ***