[packagekit] Storing extra data
hughsient at gmail.com
Tue Nov 20 15:15:32 PST 2007
We need to store some persistent data for four reasons:
1. the transaction job number has to increase each time
2. the last successful run of GetUpdates and RefreshCache so we know the
time between calling so we only call it once a day
3. the updates cache (so we can pre-fill the internal-updates cache at
4. The transaction history
Now, we currently store the job number in a silly
little /var/run/PackageKit/job_count.dat file and the transaction
history in a sqlite database in a nice table.
What I want is for the updates cache to also be stored in the sqlite
database, and possibly the job number and the RefreshCache time also.
The problem being sqlite's funny callback routine thing. I need to fire
a quick command _get_job_number and return back an int synchronously,
not async. Has any one got any ideas on how to run the sqlite
sqlite3_exec call so we wait for the last result? Or am I abusing the
database concept? Or does sqlite return results sync?
More information about the PackageKit