Modify ↓
Ticket #876 (closed defect: fixed)
YUMng throws exception on RHEL4
Reported by: | davisj <[email protected]…> | Owned by: | jjneely |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
With yum 2.4.3 on a rhel4 client, python 2.3. YUMng throws the following exception.
Reading Local RPMDB Baseurl(s) for repo: ['http://server/mrepo/rhel4-i386/RPMS.all/'] Building updates object Setting up Package Sacks Excluding Incompatible Archs Finished Failed to instantiate tool Bcfg2.Client.Tools.YUMng.YUMng Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/Bcfg2/Client/Frame.py", line 82, in __init__ self.tools.append(tool(self.logger, setup, config)) File "/usr/lib/python2.3/site-packages/Bcfg2/Client/Tools/YUMng.py", line 97, in __init__ dest[pname].update(data) AttributeError: keys Loaded tool drivers: Action Chkconfig POSIX RPMng
The value of pkg, dest[pname] and data at this point in the code are "('kernel', 'i686', '0', '2.6.9', '89.0.20.EL')", "{'i686': ('0', '2.6.9', '89.EL')}", and "[('i686', ('0', '2.6.9', '89.0.20.EL'))]" respectively.
The following patch against trunk seems to fix the issue though I'm not certain it wouldn't introduce other problems.
--- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -97,7 +97,10 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): pname = pkg[0] data = [(pkg[1], (pkg[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2), pkg[bdf1fcc0d0d51b9655d3aa223a5885ca9b7481c3] (SVN r3), pkg[0b7e84b4a19d507724fe8267bf5952e9f25c5733] (SVN r4)))] if pname in dest: - dest[pname].update(data) + try: + dest[pname].update(data) + except AttributeError: + dest[pname].update(dict(data)) else: dest[pname] = dict(data)
Attachments
Change History
comment:1 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.1.1 Release (Bugfix)
comment:2 Changed 13 years ago by jjneely
- Owner changed from desai to jjneely
- Priority changed from major to minor
- Status changed from new to assigned
This bug is now superceded by bug # 935 as the YUMng code has been mostly rewritten.
I'll leave this open as this does apply to the code attached to 935.
comment:3 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.1 Release (Bugfix) to Bcfg2 1.1.2 Release (Bugfix)
Note: See
TracTickets for help on using
tickets.