Merge lp:~marcustomlinson/update-manager/update-manager into lp:update-manager

Proposed by Marcus Tomlinson
Status: Merged
Merged at revision: 2890
Proposed branch: lp:~marcustomlinson/update-manager/update-manager
Merge into: lp:update-manager
Diff against target: 50 lines (+14/-3)
2 files modified
UpdateManager/backend/__init__.py (+7/-3)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~marcustomlinson/update-manager/update-manager
Reviewer Review Type Date Requested Status
Brian Murray Approve
Ubuntu Core Development Team Pending
Review via email: mp+384709@code.launchpad.net

Commit message

Fix hang (LP: #1874591) and crash (LP: #1880987) in snap updates.

To post a comment you must log in.
2890. By Marcus Tomlinson

Fix hang (LP: #1874591) and crash (LP: #1880987) in snap updates

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for the crash fix, I should have put some more effort into thinking about how to fix it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'UpdateManager/backend/__init__.py'
--- UpdateManager/backend/__init__.py 2020-04-23 15:17:55 +0000
+++ UpdateManager/backend/__init__.py 2020-05-28 09:38:10 +0000
@@ -113,8 +113,10 @@
113 self.window_main.cache._initDepCache()113 self.window_main.cache._initDepCache()
114 cache = self.window_main.cache114 cache = self.window_main.cache
115 except Exception as e:115 except Exception as e:
116 # just return an empty array for now, it's perfectly safe to
117 # postpone this duplicates check to a later update.
116 logging.debug("error reading cache (%s)" % e)118 logging.debug("error reading cache (%s)" % e)
117 cache = None119 return []
118120
119 duplicates = []121 duplicates = []
120 seeded_snaps, _ = self.get_snap_seeds()122 seeded_snaps, _ = self.get_snap_seeds()
@@ -301,7 +303,8 @@
301 #close_after_install = False303 #close_after_install = False
302304
303 if action == self.ACTION_INSTALL:305 if action == self.ACTION_INSTALL:
304 if success and os.path.exists("/usr/bin/snap"):306 if (success and os.path.exists("/usr/bin/snap")
307 and hasattr(self, 'pane_update_progress')):
305 Thread(target=self.update_snaps).start()308 Thread(target=self.update_snaps).start()
306 elif success:309 elif success:
307 self.window_main.start_available()310 self.window_main.start_available()
@@ -315,7 +318,8 @@
315 else:318 else:
316 if error_string:319 if error_string:
317 self.window_main.start_error(True, error_string, error_desc)320 self.window_main.start_error(True, error_string, error_desc)
318 elif success and os.path.exists("/usr/bin/snap"):321 elif (success and os.path.exists("/usr/bin/snap")
322 and hasattr(self, 'pane_update_progress')):
319 self.window_main.duplicate_packages = self.get_deb2snap_dups()323 self.window_main.duplicate_packages = self.get_deb2snap_dups()
320 self.window_main.start_available()324 self.window_main.start_available()
321 else:325 else:
322326
=== modified file 'debian/changelog'
--- debian/changelog 2020-05-27 20:29:41 +0000
+++ debian/changelog 2020-05-28 09:38:10 +0000
@@ -1,3 +1,10 @@
1update-manager (1:20.04.12) groovy; urgency=medium
2
3 * Fix hang in apturl-gtk. (LP: #1874591)
4 * Fix crash in snap updates when refreshing the cache fails. (LP: #1880987)
5
6 -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Thu, 28 May 2020 10:11:51 +0100
7
1update-manager (1:20.04.11) groovy; urgency=medium8update-manager (1:20.04.11) groovy; urgency=medium
29
3 * UpdateManager/UpdateManager.py: when refreshing the cache and encountering10 * UpdateManager/UpdateManager.py: when refreshing the cache and encountering

Subscribers

People subscribed via source and target branches

to status/vote changes: