Bug 481189

Summary: Yum broken with new sqlite-3.6.10 in rawhide
Product: [Fedora] Fedora Reporter: Nicholas Wourms <nwourms>
Component: sqliteAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, katzj, mmcgrath, pmatilai, selinux, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-22 20:01:31 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 Nicholas Wourms 2009-01-22 17:04:46 UTC
Description of problem:
Yum fails with latest sqlite 3.6.10 in rawhide.

Version-Release number of selected component (if applicable):
yum-3.2.21-3

How reproducible:
Always

Steps to Reproduce:
1. Update to new sqlite.
2. Remove /var/cache/yum directory.
3. Run a yum update.
  
Actual results:
It fetches the primary dbs for all the repos and then returns the following error:
Error: malformed database schema (removals) - no such table: main.packages

Expected results:
Update without error.

Additional info:
Yum works as expected if you revert to the previous sqlite-3.6.7, so it is definitely some change in the sqlite api.

There is also an issue with local repositories created with createrepo. I had a local repository in my repos.d and it causes the following error:
localrepo                                                                                                                                                                                                             | 1.0 kB     00:00
localrepo/primary                                                                                                                                                                                                     |  27 kB     00:00

(process:5225): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed

(process:5225): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
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 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 339, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 101, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 112, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 592, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 435, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 251, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 184, in populate
    dobj = repo_cache_function(xml, csum)
  File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 45, in getPrimary
    self.repoid))
TypeError: Can not create packages table: near "release": syntax error

Again, when I revert to the previous sqlite 3.6.7, yum works as expected.

Comment 1 Tom London 2009-01-22 17:45:58 UTC
It also "works for me" if I leave the new sqlite update but revert the new fedora-release.

Comment 2 James Antill 2009-01-22 19:01:19 UTC
Tom can you make sure that's true ... do a:

yum list sqlite yum fedora-release
sha1sum /var/cache/yum/rawhide/*

...both before and after?

Comment 3 James Antill 2009-01-22 19:02:38 UTC
rpm -q if the yum list doesn't work.

Comment 4 Tom London 2009-01-22 19:11:07 UTC
Uhhh..  

No, I was mistaken.  Sorry.

Appears I had backed out both fedora-release and sqlite at the same time.

Comment 5 Panu Matilainen 2009-01-22 19:42:16 UTC
This is sqlite bug alright, see
http://www.mail-archive.com/sqlite-users@sqlite.org/msg39666.html

My bad (insufficient testing), apologies. Will fix right away.

Comment 6 seth vidal 2009-01-22 19:57:02 UTC
You're my hero.

Comment 7 Panu Matilainen 2009-01-22 20:01:31 UTC
Fixed in sqlite-3.6.10-2.fc11.

If I hadn't put out a broken version, there wouldn't have be anything to fix and I wouldn't get called anybody's hero. Wonder what the morale of this is ;)

Comment 8 seth vidal 2009-01-22 20:05:47 UTC
We still love you, Panu. :)