Bug 220841

Summary: packageSack.returnNewestByName() broken in yum 3.0.1
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-27 22:51:20 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 Ville Skyttä 2006-12-27 20:27:29 UTC
packageSack.returnNewestByName() appears to be broken in yum-3.0.1-2.fc6.

Reproducer is in upgradecheck.py CVS rev 1.28,
http://cvs.fedora.redhat.com/viewcvs/upgradecheck/upgradecheck.py?root=fedora&rev=1.28&view=auto
(line numbers could be a bit off):

Traceback (most recent call last):
  File "./upgradecheck.py", line 257, in ?
    main()
  File "./upgradecheck.py", line 162, in main
    for l in solvers[dist].pkgSack.returnNewestByName():
  File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 298, in
returnNewestByName
    bestofeach.addList(self._computeAggregateListResult("returnNewestByName", name))
  File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 650, in addList
    self.addPackage(pkgobj)
  File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 474, in
addPackage
    repoid = obj.returnSimple('repoid')
AttributeError: 'list' object has no attribute 'returnSimple'

One workaround which I'll apply to upgradecheck.py is to use
returnNewestByNameArch() instead of returnNewestByName() (and eliminate the
related inner loop), but it'd be nice to have returnNewestByName() fixed.  It
works as expected in yum-2.6.1-0.fc5.

Comment 1 Michael Schwendt 2006-12-27 21:24:53 UTC
Same as bug 189612.

Comment 2 Ville Skyttä 2006-12-27 22:51:20 UTC
Ah, indeed.

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