Bug 458803

Summary: yum api change to conditionals breaks livecd-tools
Product: [Fedora] Fedora Reporter: Jesse Keating <jkeating>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: davidz, dcantrell, ffesti, james.antill, katzj, pmatilai, tim.lauridsen, wwoods
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: 2008-09-23 22:24:19 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:
Bug Depends On:    
Bug Blocks: 438943    
Attachments:
Description Flags
Patch to work with the yum api change none

Description Jesse Keating 2008-08-12 12:28:44 UTC
Recently yum changed it's API so that the conditionals dict should only have package names in it, rather than package objects.  This breaks livecd-tools somewhere around line 105 of yuminst.py

Traceback (most recent call last):
  File "/usr/lib64/python2.5/pdb.py", line 1213, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib64/python2.5/pdb.py", line 1138, in _runscript
    self.run(statement, globals=globals_, locals=locals_)
  File "/usr/lib64/python2.5/bdb.py", line 366, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "/usr/bin/livecd-creator", line 132, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 115, in main
    creator.install()
  File "/usr/lib/python2.5/site-packages/imgcreate/creator.py", line 638, in install
    self.__deselect_packages(ayum)
  File "/usr/lib/python2.5/site-packages/imgcreate/creator.py", line 595, in __deselect_packages
    ayum.deselectPackage(pkg)
  File "/usr/lib/python2.5/site-packages/imgcreate/yuminst.py", line 103, in deselectPackage
    if x in pkgs:
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 265, in __eq__
    if comparePoEVR(self, other) == 0 and self.arch == other.arch and self.name == other.name:
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 48, in comparePoEVR
    (e2, v2, r2) = (po2.epoch, po2.version, po2.release)
AttributeError: 'str' object has no attribute 'epoch'

Comment 1 Jesse Keating 2008-08-12 12:46:08 UTC
Created attachment 314092 [details]
Patch to work with the yum api change

Attached a patch to handle the API change.

Comment 2 Jeremy Katz 2008-08-12 13:28:40 UTC
This then breaks compatibility with using old yum.  We need to fix it in yum instead of going through and fixing up every user of the yum API

Comment 3 Jeremy Katz 2008-09-23 22:24:19 UTC
This got fixed in 3.2.19