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

James Bowes jbowes at dangerouslyinc.com
Tue Nov 6 14:53:52 PST 2007


On 11/6/07, Tom Parker <palfrey at tevp.net> wrote:
> 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.

+1 for dying if the db can't be opened.

-James



More information about the PackageKit mailing list