[packagekit] (no subject)
Zhang, Qiang Z
qiang.z.zhang at intel.com
Wed Dec 15 19:01:12 PST 2010
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/81d262a2/attachment-0003.htm>
More information about the PackageKit
mailing list