[packagekit] initial work on the apt dbus backend
Richard Hughes
hughsient at gmail.com
Wed Feb 13 11:27:36 PST 2008
On Wed, 2008-02-13 at 14:23 -0500, Robin Norwood wrote:
> On Wed, 13 Feb 2008 19:04:58 +0000
> Richard Hughes <hughsient at gmail.com> wrote:
>
> > On Wed, 2008-02-13 at 20:00 +0100, Sebastian Heinlein wrote:
> > > I started to create a dbus based backend for apt. Currently it is
> > > more or less a copy and paste combination of the current apt
> > > backend and the yum2 one.
> >
> > Cool. Do you think any of the yum2 backend stuff could be abstracted?
> > Did you think the dbus interface was obvious? The yum2 backend also
> > has quite a few problems - for instance I think it exits in the event
> > of an error. I would copy it with a pinch of salt.
>
> Yeah, it's very much a WIP. I'm making some fixes to it today, in
> fact. In addition to the exit-on-error thing, I have a short list:
>
> o The constants issue Richard brought up on the list the other day.
I fixed that - keep to strings. The string -> enum conversion wouldn't
even register a time on my profiling.
> o Need to lock the yum backend in a more granular way than it does now
> - ie, at the beginning and end of each transaction, instead of at the
> beginning and end of the daemon's life.
Totally.
> o Need to make sure the c backend is killing off the daemon when it
> exits, and maybe add a timeout so the yum backend doesn't continue to
> live if the c backend goes away unexpectedly.
Timeout is sane, but we probably need to make it quite long. The daemon
should already kill the backend on nice exit (i.e. not ctrl-c)
> Since PACKAGEKIT_DBUS_INTERFACE is different per-backend, I'm not sure
> if there's a pythonic way to abstract that into a base class, but keep
> the PACKAGEKIT_DBUS_INTERFACE constant per-child-class. Anyone with
> python skills know? That way most of the signals could just go in the
> base class, like the old yum/python backends.
That could rock.
Richard.
More information about the PackageKit
mailing list