[packagekit] Session D-BUS API

Trever Fischer wm161 at wm161.net
Sat Mar 7 14:05:20 PST 2009


>
> > Eg, if an app calls them, should it wait for them to complete
> > before going on and assuming the job completed? I think it'd be easier to
> > implement if they all returned some kind of job ID, and a jobComplete(id)
> > signal got emitted, since the packagekit calls are already asynchronous.
>
> I thought about that, but i really wanted the interface to be
> fire-and-forget in that an application just called into the interface,
> and it returned with success or failure. This needs to be kept very
> simple for most apps.
I was afraid you'd say that...
>
> > Then
> > it'd be up to the specific app developer if they really want the calls to
> > be synchronous or not. I mostly make this point because I'd rather not
> > have a bunch of event loops floating around in kded to convert the native
> > async calls to sync ones.
>
> Yes, lots of event loops are icky.
...and thats why. I'm sure we can manage it though.

>
> > The exception of course is IsPackageInstalled.
>
> Sure, but bear in mind this can block for a few minutes too if
> packagekitd is servicing other transactions.
>
> > 2. What is InstallProvideFile supposed to do? Is it supposed to search
> > the list of available files for whats needed? Shouldn't whatProvides() be
> > able to handle that?
>
> It literally installs a package that provides the file /usr/bin/foo.
> Basically, it's a way for an application to say "I need $this_file --
> JUST DO IT" and not worry about all the details.
The packagekit-qt API doesn't seem to allow whatProvides to return a list of 
packages that provide a certain file. It seems the only way to do it is to use 
searchFile().
>
> > 3. What are the xid and timestamp arguments for? Am I correct in assuming
> > xid is an X11 window ID?
>
> Well, you don't need to copy the "old" interface with the timestamps,
> and yes, an XID is used to make the download window modal over the
> window that launched the window. If the method is async, it also makes
> doing that harder. FWIW, I think the max bus timeout is now pretty long
> as  long as you set it to MAX_UINT, but I am open to other ways of doing
> it as the session methods need to be cross desktop.
>
Ah, ok. I'm still curious what the timestamp was used for though :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090307/044ec7f7/attachment-0004.pgp>


More information about the PackageKit mailing list