Merge pull request #850 from mwhudson/more-install-states
introduce a couple more installstates
This commit is contained in:
commit
ac120fe784
|
@ -166,6 +166,8 @@ class InstallState(enum.Enum):
|
|||
NOT_STARTED = enum.auto()
|
||||
NEEDS_CONFIRMATION = enum.auto()
|
||||
RUNNING = enum.auto()
|
||||
POST_WAIT = enum.auto()
|
||||
POST_RUNNING = enum.auto()
|
||||
UU_RUNNING = enum.auto()
|
||||
UU_CANCELLING = enum.auto()
|
||||
DONE = enum.auto()
|
||||
|
|
|
@ -291,9 +291,6 @@ class InstallProgressController(SubiquityTuiController):
|
|||
|
||||
log.debug('curtin_install completed: %s', cp.returncode)
|
||||
|
||||
self.update_state(InstallState.DONE)
|
||||
log.debug('After curtin install OK')
|
||||
|
||||
def cancel(self):
|
||||
pass
|
||||
|
||||
|
@ -316,15 +313,16 @@ class InstallProgressController(SubiquityTuiController):
|
|||
|
||||
await self.curtin_install(context=context)
|
||||
|
||||
self.update_state(InstallState.POST_WAIT)
|
||||
|
||||
await asyncio.wait(
|
||||
{e.wait() for e in self.model.postinstall_events})
|
||||
|
||||
await self.drain_curtin_events(context=context)
|
||||
|
||||
await self.postinstall(context=context)
|
||||
self.update_state(InstallState.POST_RUNNING)
|
||||
|
||||
self.ui.set_header(_("Installation complete!"))
|
||||
self.progress_view.set_status(_("Finished install!"))
|
||||
await self.postinstall(context=context)
|
||||
|
||||
if self.model.network.has_network:
|
||||
self.update_state(InstallState.UU_RUNNING)
|
||||
|
|
|
@ -146,6 +146,12 @@ class ProgressView(BaseView):
|
|||
elif state == InstallState.RUNNING:
|
||||
self.title = _("Installing system")
|
||||
btns = [self.view_log_btn]
|
||||
elif state == InstallState.POST_WAIT:
|
||||
self.title = _("Installing system")
|
||||
btns = [self.view_log_btn]
|
||||
elif state == InstallState.POST_RUNNING:
|
||||
self.title = _("Installing system")
|
||||
btns = [self.view_log_btn]
|
||||
elif state == InstallState.UU_RUNNING:
|
||||
self.title = _("Install complete!")
|
||||
self.reboot_btn.base_widget.set_label(
|
||||
|
|
Loading…
Reference in New Issue