Merge lp:~gary-lasker/software-center/fix-crash_lp973379 into lp:software-center/5.2

Proposed by Gary Lasker
Status: Merged
Merged at revision: 3013
Proposed branch: lp:~gary-lasker/software-center/fix-crash_lp973379
Merge into: lp:software-center/5.2
Diff against target: 11 lines (+1/-0)
1 file modified
softwarecenter/ui/gtk3/app.py (+1/-0)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash_lp973379
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+105725@code.launchpad.net

Description of the change

This branch should fix intermittent crasher bug 973379 by makes sure the cache is ready before accessing the installed package list for upload to the recommender service. Since this happens asynchronously, it can occur on a cache refresh, causing the potential for the crash.

I could not find a reliable way to reproduce this error as it depends quite heavily on timing, but this should be a very low-risk change.

Thanks!

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this branch, looks good. Its a bit scary that this can happen as the profile upload is timed after 45s but its probably a combination of cache-reopen after e.g. software-center-agent finished.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/app.py'
2--- softwarecenter/ui/gtk3/app.py 2012-05-10 17:12:20 +0000
3+++ softwarecenter/ui/gtk3/app.py 2012-05-14 21:38:19 +0000
4@@ -498,6 +498,7 @@
5 self.menuitem_recommendations.set_label(
6 _(u"Turn On Recommendations…"))
7
8+ @wait_for_apt_cache_ready
9 def _upload_recommendations_profile(self):
10 recommender_agent = self._get_recommender_agent()
11 if recommender_agent.is_opted_in():

Subscribers

People subscribed via source and target branches