Description of problem: The latest yum build _(yum-3.2.1-4.el5) seems to be breaking rhn_check. We have tried rhn_check the previous yum build and it works. The trace back is attached. Version-Release number of selected component (if applicable): Rhel 5.1 yum-3.2.1-4.el5 How reproducible: always Steps to Reproduce: 1. Register a Rhel5.1 client to webqa 2. schedule a package install on the client. 3. run rhn_check -vvv Actual results: exception (see aditional info) Expected results: successful package install. Additional info: Mon Jul 30 14:56:06 2007] up2date D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>alacarte</string></value>\n<value><string>0.10.0</string></value>\n<value><string>1.fc6</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 57625154} [Mon Jul 30 14:56:06 2007] up2date updating login info [Mon Jul 30 14:56:06 2007] up2date logging into up2date server [Mon Jul 30 14:56:06 2007] up2date successfully retrieved authentication token from up2date server [Mon Jul 30 14:56:06 2007] up2date D: logininfo: {'X-RHN-Server-Id': 1007658916, 'X-RHN-Auth-Server-Time': '1185822804.11', 'X-RHN-Auth': 'xaK9ua0I8EfrT+lw/f7QOA==', 'X-RHN-Auth-Channels': [['rhel-i386-server-5', '20070726152304', '1', '1'], ['rhn-tools-rhel-i386-server-5', '20070625154343', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'} [Mon Jul 30 14:56:06 2007] up2date D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>alacarte</string></value>\n<value><string>0.10.0</string></value>\n<value><string>1.fc6</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 57625154} [Mon Jul 30 14:56:06 2007] up2date D: handle_action actionid = 57625154, version = 2 [Mon Jul 30 14:56:06 2007] up2date D: do_call packages.update ([['alacarte', '0.10.0', '1.fc6', '']],) [Mon Jul 30 14:56:06 2007] up2date D: Called update [['alacarte', '0.10.0', '1.fc6', '']] [Mon Jul 30 14:56:09 2007] up2date D: Searching for installed package to remove: ('python', 'i386', '0', '2.4.3', '19.el5') [Mon Jul 30 14:56:09 2007] up2date D: Found 1 package(s) to remove [Mon Jul 30 14:56:09 2007] up2date Traceback (most recent call last): File "/usr/sbin/rhn_check", line 273, in __run_action (status, message, data) = CheckCli.__do_call(method, params) File "/usr/sbin/rhn_check", line 266, in __do_call retval = method(*params) File "/usr/share/rhn/actions/packages.py", line 217, in update return runTransaction(transaction_data) File "/usr/share/rhn/actions/packages.py", line 250, in runTransaction return _run_yum_action(command) File "/usr/share/rhn/actions/packages.py", line 282, in _run_yum_action yum_base.buildTransaction() File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 527, in buildTransaction (rescode, restring) = self.resolveDeps() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 804, in resolveDeps deps = self._mytsCheck() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 774, in _mytsCheck thisneeds = self._checkInstall(txmbr) File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 958, in _checkInstall if txmbr.name == dep.name: exceptions.AttributeError: 'list' object has no attribute 'name' [Mon Jul 30 14:56:09 2007] up2date D: Sending back response ((6,), 'Fatal error in Python code occured', {}) [Mon Jul 30 14:56:09 2007] up2date D: do_call packages.checkNeedUpdate ('rhnsd=1',) [Mon Jul 30 14:56:09 2007] up2date D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
so in this
If we downgrade to yum-3.0.1-5.el5 yum-metadata-parser-1.0-8.fc6 yum-updatesd-3.0.1-5.el5 the latest GA everything works fine.. looks like rhn_check as always is passing in the pkg data as a list, but apparently this has changed in 5.1 yum and its now expecting a pkg object? yum should take into account how rhn_check is passing data and handle the dep solving appropriately.
Maybe, it might be easier to fix rhn_check or action/packages.py One thing that stands out in add_transaction_data() in RHN plugin is that update/install are just passing the keywords for the packages ... but remove (which I think is the one failing) does calls to rpmdb.returnPackages() and then yum.packages.parsePackages() and then yum.misc.unique(). Is there a reason for this?
So with lots of thanks to Seth and Pradeep we've found the problem in yum-rhn-plugin: In actions/packages.py we have: class YumAction(yum.YumBase): def getInstalledPackageObject(self, package_tup): ...and this returns a list of package objects, instead of a single package object or None. The same call in yum itself only returns a single package, and code relies on that. One easy way to fix this is to remove the above function and calling self.remove(**pkgkeys) like for update/install, the other being to just call it something else?
It's also worth noting that there's a very significant chance we'll move the yum errata to 5.2.
fixed Committed revision 118874.
verified
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0594.html