This has been (mostly) fixed.
I think that there are some possible improvements regarding schema upgrading / 
database creation.

As Seif said in #9, to replicate this:
1) Backup activity.sqlite
2) Restart the daemon
3) While "Updating sql schema" kill the daemon

The problem, however, is that this bug does not manifest in the way
described above. What we are doing in the above replication is creating
a new database (this is checked by new_database = not
os.path.exists(file_path)), and interrupting the process half-way
through. If we then apply _do_schema_upgrade on the corrupted database
it will fail, as there will be column names that already exist. In
short, a corrupted upgrade != a corrupted database creation, and we
*cannot* mix the two together. A quick fix is to apply
_do_schema_upgrade on both cases, and take a duplicate column name error
as a symptom of a corrupted database creation -- this allows us to
delete the database, so that the next time zeitgeist-daemon is run it is
re-created.

I will be including some test cases soon :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/660307

Title:
  zeitgeist fails to run if its database structure is not complete

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to