[packagekit] Fun things that happen when the transaction db doesn't open

Tom Parker palfrey at tevp.net
Tue Nov 6 14:50:05 PST 2007

In short, packagekit goes *splut*. Firstly, there's an error in the
code which means that a reference to the not-opened db sticks around
(or at least it looks like this is possible, depends on the precise
behaviour of sqlite3_open in this case). Secondly, every other call
into the transaction functions does funny things because it's trying
to play around with this borked pointer.

Admittedly, the case where I ran into this was when I hadn't installed
anything for PackageKit, and was trying to run it from the src dir
(without even the relevant directory being available for pk to write
to), but it's still bad. My suggestion: change the pk_warning on
transaction db open failure to an error, 'cause it's a very bad thing.
Patch attached to do that. Alternate options include falling back on
simply dropping all transaction related stuff if the db can't be
opened, but that's not so healthy.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Error-out-on-transaction-db-open-fail.patch
Type: text/x-patch
Size: 951 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071106/b3c13539/attachment-0004.bin>

More information about the PackageKit mailing list