[packagekit] About Transaction Cancel Method

Zhang, Qiang Z qiang.z.zhang at intel.com
Wed Dec 15 19:05:11 PST 2010


Sorry , add the Title:(

_____________________________________________
From: Zhang, Qiang Z
Sent: Thursday, December 16, 2010 11:01 AM
To: 'hughsient at gmail.com'
Cc: 'packagekit at lists.freedesktop.org'
Subject:


Hi Richard,

I want to implemented the cancel API for zypp backend. But have not found the proper way.

I have reviewed the cancel method of other backends, and found it's easy to call pk_backend_spawn_kill (spawn) if backend use PkBackendSpawn.

But for the backend,  which don't use PkBackendSpawn,  it's complicated to implemented this transaction cancel method. Such as poldek, which call poldek's sigint_emit () to cancel transaction and sigint_emit is implemented in poldek but not PackageKit.

Most of the other backends just set the transaction status and do nothing.

I think, can PackageKit provide a function pk_backend_thread_cancel in pk-backend.c to send signal to the backend thread, the signal handler in thread can release some resources then call g_thread_exit to exit.
Then all the backend use thread can call pk_backend_thread_cancel to cancel transaction.

Or any other method?


-Thanks
-Xiaoqiang


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20101216/0766858b/attachment-0004.htm>


More information about the PackageKit mailing list