Launcher - Cancel an installation (deny to give the password) keep application's icon in the launcher

Bug #972710 reported by Aurélien RIVIERE
108
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Fix Released
High
John Lea
aptdaemon (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Medium
Unassigned
software-center (Ubuntu)
Fix Released
Medium
Gary Lasker
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Medium
Gary Lasker

Bug Description

Ubuntu 12.04 beta 32bits
All packages up to date (03 april)

Open the software center
Select an app (me : pitivi)
Ask to install
When a dialog ask you your passwd, close the dialog : the installation is cancelled

=> The application's icon keep displayed in the bottom of the launcher !

------------------------------------------
Desired Solution:

- The icon should disappear from the launcher

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hello Aurélien, and thank you for reporting this bug! This is part of the Unity launcher integration. Once the installation has begun, the Unity launcher monitors the aptdaemon process events and if the install is cancelled, the icon should be removed from the launcher.

I believe this must be fixed on the Unity side, so I'll change the package to Unity. Bilal, I hope you don't mind, but I thought I'd assign this to you to get your take on it. Please feel free to unassign, or reassign, as appropriate. Also, if a change is needed on the Software Center side, please add that as a task as well.

Many thanks!

affects: software-center (Ubuntu) → unity (Ubuntu)
Changed in unity (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Bilal Akhtar (bilalakhtar)
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Per Bilal's comment in duplicate bug 982343, this bug indeed needs a fix in the Software Center side. I'll update the target accordingly.

Bilal: "Software Center needs to send the DBus call to Unity AFTER the authentication dialog is complete."

Changed in unity (Ubuntu):
assignee: Bilal Akhtar (bilalakhtar) → nobody
milestone: none → ubuntu-12.04
affects: unity (Ubuntu) → software-center (Ubuntu)
Changed in software-center (Ubuntu):
status: Confirmed → Triaged
Changed in software-center (Ubuntu):
assignee: nobody → Gary Lasker (gary-lasker)
status: Triaged → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

I have no insight in the unity implementation so pardon my ignorance here please. But canceling or errors also keep the icon in the launcher so its probably more than just sending the signal after the authentication dialog (which is a good idea).

Maybe this does needs unity fixing? Or do we need to send some sort of "cancel" signal to unity (which would be not ideal given that the user might simply close software-center at this point and then on error s-c can not send this cancel signal.

Revision history for this message
Alessandro Paolino (mark2dp) wrote :

Hi, I've reported a duplicate bug of this and I'm not an Ubuntu developer but I'm studying Software Engineering and I think that it might be implemented in this way (only an idea):

The animation starts after the authentication dialog in every case, in the Unity side (I think) there will be a boolean variable like "isCompleted" that if the download and installation finishes without errors Software Center sets to true and keeps the icon in the launcher, so if in the meantime of the process there are closures of USC or another type of errors Unity will remove it because isCompleted is false.

That's only my idea, I don't know how are structured Unity or USC so sorry for conceptual errors.

Revision history for this message
Michael Vogt (mvo) wrote :

For the case when the install fails or is canceled (bug #982921) I added a unity branch now:
https://code.launchpad.net/~mvo/unity/usc-launcher-fix-982921/+merge/102257

The authentication cancel/denied is apparently not fixed by this though.

Revision history for this message
Michael Vogt (mvo) wrote :

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.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I already worked on a branch to add handling of authentication errors, see the linked branch. Perhaps as an SRU?

Changed in aptdaemon (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

The above branch also handles the case if there isn't any authentication manager running in the user's session.

Changed in aptdaemon (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Gary Lasker (gary-lasker) wrote :

I made the change in Software Center where we now send the dbus call to add the item to the Unity launcher *after* the auth dialog has been completed. With this change, the item will no longer be shown in the launcher on a cancel. This is now fix committed and will be released as part of the first software-center SRU for Precise.

Thanks, all!

Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Sebastian Heinlein (glatzor) wrote : Re: [Bug 972710] Re: Cancel an installation (deny to give the password) keep application's icon in the launcher

Am Donnerstag, den 19.04.2012, 15:33 +0000 schrieb Gary Lasker:
> I made the change in Software Center where we now send the dbus call to
> add the item to the Unity launcher *after* the auth dialog has been
> completed. With this change, the item will no longer be shown in the
> launcher on a cancel. This is now fix committed and will be released as
> part of the first software-center SRU for Precise.
>
> Thanks, all!

Thanks Gary, that is the best approach!

Revision history for this message
Lilian A. Moraru (lilianmoraru) wrote : Re: Cancel an installation (deny to give the password) keep application's icon in the launcher

That looks like a hack.
The bug should be reopened and here it is why(this are actually 2 bugs in 1 report):

I tried to install an application, the connection to the internet was lost for about 1 second(it reconnected very fast) but the installation of the software stopped and didn't want to go any further just because of a simple spike in the connection. I had 2 applications to install, the second one was on wait so I stopped the first one so the second one could install.
The second one started to install(good) but the icon of the first one which got canceled remained on the launcher(bad) and when I tried to click on it, it was doing nothing(because the application did not install).

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello RIVIERE, or anyone else affected,

Accepted software-center into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in software-center (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Cancel an installation (deny to give the password) keep application's icon in the launcher

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in aptdaemon (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Aurélien RIVIERE (aurelien-riv) wrote :

Fixed.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Since the original reporter Riviere has stated that this has been fixed, I am removing the tag "verification-needed" and added "verification-done".

tags: added: verification-done
removed: verification-needed
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Thank you, Aurélien and Nekhelesh for your verification and for reporting back. I've also verified this fix with the version 5.2.1 in precise-proposed.

Many thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.2.1

---------------
software-center (5.2.1) precise-proposed; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp977179:
    - make the review UI react correctly to conditions of network
      availability (LP: #977179)
  * lp:~mvo/software-center/fix-crash-deb-file-size-calc:
    - fix crash when installing a deb file that is not found in
      the current apt cache
  * lp:~mvo/software-center/lp981992:
    - fix a crash in the new a11y code if there is a row that has
      no data or is not yet preloaded (LP: #981992)
  * lp:~mvo/software-center/fix-gmenu-searcher:
    - fix the menu searcher for non-Unity configurations after
      the app-install-data-ubuntu file layout changed
  * lp:~mvo/software-center/lp808455:
    - trivial fix for crash on downstream distros (LP: #808455)
  * lp:~mvo/software-center/lp927262:
    - fix crash when get_vadjustment() returns None (LP: #927262)
  * lp:~mvo/software-center/utf8-fixes:
    - fix various utf8-related crashes (LP: #943500, LP: #922225,
      LP: #917755)
  * lp:~mvo/software-center/gwibber-utf8-lp985255:
    - fix a utf8 crash in the gwibber integration (LP: #985255)
  * lp:~mvo/software-center/workaround-gtk-regression-lp986186:
    - workaround performance issue with the Gtk.TreeView.set_model()
      call when there is a cell_data_func attached. Not every user is
      affected (settings dependant somehow), but when affected it causes
      a massive performance degration for huge list models like "System"
      (LP: #986186). This branch works around the problem by disconnecting
      the cell_data_func before setting the new model.
  * lp:~mvo/software-center/fix-clear-credentials-race:
    - fix an incorrect use of the sso dbus backend, we now correctly
      wait until it emits a CredentialsCleared signal (LP: #986117)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/add-to-launcher-after-auth-lp972710:
    - fix bug where an application will be added to the Unity launcher
      in the case where the user cancels the installation auth dialog
      (LP: #972710)
  * lp:~gary-lasker/software-center/recommendations-sso-login-lp973612:
    - fix bug where the recommendations opt-in panel is hidden if
      the user declines the SSO dialog after opting in (LP: #973612)
    - fix the user experience if the user has previously opted-in to
      recommendations and their SSO token is found have been removed
      or revoked or otherwise found to be invalid (LP: #967064)
    - improve the responsiveness of the spinner in the recommendations
      flow
 -- Michael Vogt <email address hidden> Thu, 26 Apr 2012 09:47:19 +0200

Changed in software-center (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in software-center (Ubuntu Precise):
status: Fix Committed → Fix Released
John Lea (johnlea)
description: updated
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → High
status: New → Triaged
tags: added: udp
Michael Vogt (mvo)
Changed in aptdaemon (Ubuntu Precise):
status: Confirmed → Fix Released
Changed in aptdaemon (Ubuntu Quantal):
status: In Progress → Fix Released
John Lea (johnlea)
summary: - Cancel an installation (deny to give the password) keep application's
- icon in the launcher
+ Launcher - Cancel an installation (deny to give the password) keep
+ application's icon in the launcher
Changed in ayatana-design:
status: Triaged → Fix Committed
Changed in ayatana-design:
status: Fix Committed → Fix Released
tags: added: reviewedbydesignq
removed: udp
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.