Comment 7 for bug 972710

Revision history for this message
Michael Vogt (mvo) wrote : Re: Cancel an installation (deny to give the password) keep application's icon in the launcher

I added a aptdaemon task as it appears that aptdaemon does not send a "Finished" signal on authentication cancel.
We could workaround this via something like:
=== modified file 'softwarecenter/backend/installbackend_impl/aptd.py'
--- softwarecenter/backend/installbackend_impl/aptd.py 2012-04-10 14:52:59 +0000
+++ softwarecenter/backend/installbackend_impl/aptd.py 2012-04-17 09:25:02 +0000
@@ -945,6 +945,9 @@
             self._on_trans_error(error, pkgname)
             # on error we need to clean the pending purchases
             self._clean_pending_purchases(pkgname)
+ # ensure the transaction is also canceled inside aptdaemon,
+ # this should actually happen inside aptdaemon I guess
+ trans.cancel()
         # on success the pending purchase is cleaned when the package
         # that was purchased finished installing
         if trans.role == enums.ROLE_INSTALL_PACKAGES:

or by sending the signal after successful authentication. I will wait for glatzors input if there
is a reason not to do it inside aptdaemon itself.