InstallPackageNames should not return until the package has been installed

Bug #1042231 reported by Guillaume Desmottes
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Medium
Unassigned
Precise
Fix Released
Undecided
James M. Leddy
Session Installer
New
Undecided
Sebastian Heinlein
sessioninstaller (Ubuntu)
Fix Released
Undecided
Iain Lane
Precise
Fix Released
High
Unassigned

Bug Description

[ Description ]

- Call the D-Bus method InstallPackageNames() to install some package
- You are prompted asking if you want to actually install this package, accept
- You are pompted asking for your admin pass, enter it
- The InstallPackageNames method returns and the package is being installed

This method should not return until the package has actually be installed. That's the easiest way for the application to know that the package is now ready to be used. That's also how it's implemented in the official implementation of PackageKit.

[ Development fix ]

r132 in lp:sessioninstaller

[ SRU fix ]

identical

[ Test case ]

1. Remove some GStreamer plugin by executing `sudo apt-get purge --yes gstreamer0.10-plugins-ugly && sudo apt-get autoremove --purge --yes`.
2. Execute the command `python /usr/share/pyshared/sessioninstaller/gstinstaller.py "gstreamer|0.10|totem|Advanced Streaming Format (ASF) demuxer|decoder-video/x-ms-asf"`.

[ Regression potential ]

The most likely way this will break is to make the InstallPackageNames() function return at an inappropriate time. Check that it is synchronous, that it doesn't return until the package is installed.

Revision history for this message
Guillaume Desmottes (cassidy) wrote :

This bug blocks the UOA Empathy integration: https://bugzilla.gnome.org/show_bug.cgi?id=682802

Revision history for this message
Alberto Mardegan (mardy) wrote :

Martin Pitt would be the most competent to fix this bug, but it's not exactly his responsibility, and it's unlikely that he'll find time to fix this soon.
So, while I'm assigning the bug to him (just so that he doesn't forget about it), anyone else is welcome to step in and reclaim the bug -- after notifying Martin about it.

no longer affects: sessioninstaller
affects: sessioninstaller (Ubuntu) → sessioninstaller
Changed in sessioninstaller:
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

The patch should fix this issue. The aptd backend of session-installer now waits until the transaction reported as finished by the progress dialog.

I think that we had an API change about the behavior AptProgressDialog.run() some very long time ago. It seems that we missed this place. Previously the run method waited until the transaction was done.

Changed in sessioninstaller:
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Sebastian!

Changed in sessioninstaller:
assignee: Martin Pitt (pitti) → Sebastian Heinlein (glatzor)
status: Fix Committed → New
Iain Lane (laney)
Changed in sessioninstaller (Ubuntu):
assignee: nobody → Iain Lane (laney)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sessioninstaller - 0.20+bzr131-0ubuntu2

---------------
sessioninstaller (0.20+bzr131-0ubuntu2) quantal; urgency=low

  * Cherry-pick upstream revision 132 to make transactions synchronous, as is
    expected (LP: #1042231)
 -- Iain Lane <email address hidden> Thu, 20 Sep 2012 16:13:18 +0100

Changed in sessioninstaller (Ubuntu):
status: New → Fix Released
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Please help to backport this fix to precise, thanks.

Iain Lane (laney)
Changed in sessioninstaller (Ubuntu Precise):
assignee: nobody → Iain Lane (laney)
status: New → In Progress
Alberto Mardegan (mardy)
no longer affects: online-accounts-account-plugins
Iain Lane (laney)
description: updated
Revision history for this message
Iain Lane (laney) wrote :

Uploaded. Thanks. If someone could fill in a Test Case in the description it'd be helpful. I can't think of a good one.

Changed in sessioninstaller (Ubuntu Precise):
status: In Progress → Triaged
importance: Undecided → High
assignee: Iain Lane (laney) → nobody
Revision history for this message
James M. Leddy (jm-leddy) wrote :

$4, how did the oem run in to this problem. Do you have a test case that we can use to verify that this is fixed?

Changed in oem-priority:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I have provided a test case in the duplicate bug #1041287.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

For the record:

Ubuntu 12.04
sessioninstaller: 0.20+bzr128-0ubuntu1.1

Reproduce Steps:
1. Remove some GStreamer plugin by executing `sudo apt-get purge --yes gstreamer0.10-plugins-ugly && sudo apt-get autoremove --purge --yes`.
2. Execute the command `python /usr/share/pyshared/sessioninstaller/gstinstaller.py "gstreamer|0.10|totem|Advanced Streaming Format (ASF) demuxer|decoder-video/x-ms-asf"`.

Expect Result:
It finished after all Debian packages are installed.

Actual Result:
It shows the following messages, but there is a dialog still running the installation.

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
INFO:Initializing GStreamerInstaller
DEBUG:Add provide: Advanced Streaming Format (ASF) demuxer|gstreamer0.10(decoder-video/x-ms-asf)
INFO:Finished succesfully

This issue will be relative to Bug #1041032.

It will cause on_plugin_installation_done() of totem-3.0.1/src/backend/bacon-video-widget-gst-missing-plugins.c received GST_INSTALL_PLUGINS_SUCCESS, but it not actually.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Guillaume, or anyone else affected,

Accepted sessioninstaller into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sessioninstaller/0.20+bzr128-0ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in sessioninstaller (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi $4, woudl you be able to test the package in proposed so that we can ensure that the OEM is happy with it?

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I have verified sessioninstaller 0.20+bzr128-0ubuntu1.2 in precise-proposed, and it works well. Thanks a lot.

tags: added: verification-done
removed: verification-needed
Changed in oem-priority:
status: Incomplete → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

This bug was fixed in the package sessioninstaller - 0.20+bzr128-0ubuntu1.2

---------------
sessioninstaller (0.20+bzr128-0ubuntu1.2) precise-proposed; urgency=low

  * debian/patches/synchronous-transactions.patch: Cherry-pick patch from
    upstream (r132) to wait until transactions are done before returning (LP:
    #1042231)
 -- Iain Lane <email address hidden> Mon, 24 Sep 2012 12:48:25 +0100

Changed in sessioninstaller (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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