<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi Richard,</div>
<div> </div>
<div>I want to implemented the cancel API for zypp backend. But have not found the proper way.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>Most of the other backends just set the transaction status and do nothing.</div>
<div><font face="Times New Roman, serif"> </font></div>
<div>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.</div>
<div>Then all the backend use thread can call pk_backend_thread_cancel to cancel transaction.</div>
<div> </div>
<div>Or any other method?</div>
<div> </div>
<div> </div>
<div>-Thanks</div>
<div>-Xiaoqiang</div>
<div><font face="Times New Roman, serif"> </font></div>
<div><font face="Times New Roman, serif"> </font></div>
</font>
</body>
</html>