Bug 526294 - yum history causes sqlite traceback on RPM transaction error
Summary: yum history causes sqlite traceback on RPM transaction error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-29 17:11 UTC by Will Woods
Modified: 2014-01-21 23:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-10-01 19:53:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Will Woods 2009-09-29 17:11:17 UTC
yum-3.2.24-6.fc12.noarch

here's the traceback: 
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 315, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 263, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 492, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1081, in runTransaction
    self.history.end(rpmdbv, 2, errors=errors)
  File "/usr/lib/python2.6/site-packages/yum/history.py", line 385, in end
    self._log_errors(errors)
  File "/usr/lib/python2.6/site-packages/yum/history.py", line 351, in _log_errors
    (tid, msg) VALUES (?, ?)""", (self._tid, error))
  File "/usr/lib/python2.6/site-packages/yum/sqlutils.py", line 168, in executeSQLQmark
    return cursor.execute(query, params)
sqlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.

I added history_record=0 to /etc/yum.conf and got the error message:

[('installing package kernel-2.6.31.1-54.fc12.i686 needs 5MB on the /boot filesystem', (9, '/boot', 4442112L)), ('installing package glibc-2.10.90-24.i686 needs 5MB on the /boot filesystem', (9, '/boot', 4442112L)), ('installing package gtk2-2.18.0-5.fc12.i686 needs 5MB on the /boot filesystem', (9, '/boot', 4442112L)), ('installing package libselinux-2.0.87-1.fc12.i686 needs 5MB on the /boot filesystem', (9, '/boot', 4442112L)), ... ]

So it seems that history.end() is getting a list of error tuples, but the SQL insert statement in _log_errors is expecting a string, not a tuple. Probably it needs to format 'errors' (or just do str(errors) instead).

Comment 1 James Antill 2009-09-29 17:55:07 UTC
 Bugger changing the calling code to:

                herrors = [to_unicode(x) for (x, y) in errors]
                self.history.end(rpmdbv, 2, errors=herrors)

...will fix this problem, but I'm not sure we always get the same format for errors. Seth?

Comment 2 MartinG 2009-10-01 18:38:30 UTC
I can confirm this bug in yum-3.2.24-6.fc12.noarch when trying upgrade Rawhide. I removed some old kernels, freeing space on /boot, and then yum "worked".

Comment 3 James Antill 2009-10-01 19:53:00 UTC
This should be fixed in yum-3.2.24-9.fc12.noarch


Note You need to log in before you can comment on or make changes to this bug.