Skip to content

Commit

Permalink
fix installation hang after refreshing snap
Browse files Browse the repository at this point in the history
The installprogress controller waits for various model objects to be
configured before proceeding. But model objects whose state was loaded
from disk after a snap refresh were not marked as configured :( This
meant that, in particular, the postinstall steps waited on the language
being configured indefinitely. The fix is simple: mark model objects as
configured when their state is loaded from disk post-refresh.
  • Loading branch information
mwhudson committed Jan 30, 2020
1 parent cbaab43 commit 910b00b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subiquity/controller.py
Expand Up @@ -26,6 +26,9 @@

class SubiquityController(BaseController):

def deserialize(self, state):
self.configured()

def configured(self):
"""Let the world know that this controller's model is now configured.
"""
Expand Down
1 change: 1 addition & 0 deletions subiquity/controllers/mirror.py
Expand Up @@ -101,6 +101,7 @@ def serialize(self):
return self.model.mirror

def deserialize(self, data):
super().deserialize(data)
self.model.mirror = data

def done(self, mirror):
Expand Down
1 change: 1 addition & 0 deletions subiquity/controllers/proxy.py
Expand Up @@ -38,6 +38,7 @@ def serialize(self):
return self.model.proxy

def deserialize(self, data):
super().deserialize(data)
self.model.proxy = data

def done(self, proxy):
Expand Down
1 change: 1 addition & 0 deletions subiquity/controllers/welcome.py
Expand Up @@ -56,4 +56,5 @@ def serialize(self):
return self.model.selected_language

def deserialize(self, data):
super().deserialize(data)
self.model.switch_language(data)

0 comments on commit 910b00b

Please sign in to comment.