Merge pull request #1607 from dbungert/lunar-2023-03-21
Lunar 2023 03 21
This commit is contained in:
commit
49bf10022c
|
@ -134,7 +134,7 @@ parts:
|
||||||
bin/subiquity-service: usr/bin/subiquity-service
|
bin/subiquity-service: usr/bin/subiquity-service
|
||||||
bin/subiquity-server: usr/bin/subiquity-server
|
bin/subiquity-server: usr/bin/subiquity-server
|
||||||
bin/subiquity-cmd: usr/bin/subiquity-cmd
|
bin/subiquity-cmd: usr/bin/subiquity-cmd
|
||||||
$CRAFT_PART_BUILD/system_setup/ubuntu-wsl-setup: bin/ubuntu-wsl-setup
|
$CRAFT_PROJECT_DIR/system_setup/ubuntu-wsl-setup: bin/ubuntu-wsl-setup
|
||||||
|
|
||||||
build-attributes:
|
build-attributes:
|
||||||
- enable-patchelf
|
- enable-patchelf
|
||||||
|
|
|
@ -241,7 +241,7 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
|
||||||
clean_suffix='vg'):
|
clean_suffix='vg'):
|
||||||
pass
|
pass
|
||||||
elif action['action'] == 'done':
|
elif action['action'] == 'done':
|
||||||
if not self.ui.body.done.enabled:
|
if not self.ui.body.done_btn.enabled:
|
||||||
raise Exception("answers did not provide complete fs config")
|
raise Exception("answers did not provide complete fs config")
|
||||||
await self.app.confirm_install()
|
await self.app.confirm_install()
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
|
@ -60,6 +60,27 @@ def trim(text):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
async def check_controllers_started(definition, controller, request):
|
||||||
|
if not hasattr(controller, 'app'):
|
||||||
|
return
|
||||||
|
|
||||||
|
if getattr(definition, 'allowed_before_start', False):
|
||||||
|
return
|
||||||
|
|
||||||
|
# Most endpoints should not be responding to requests
|
||||||
|
# before the controllers have started, that's just bound to
|
||||||
|
# be a big pool of timing bugs that we want nothing to do
|
||||||
|
# with. A few chosen methods should be safe, so allow
|
||||||
|
# those to opt-in. Everybody else blocks until the
|
||||||
|
# controllers complete their start().
|
||||||
|
if controller.app.controllers_have_started.is_set():
|
||||||
|
return
|
||||||
|
|
||||||
|
log.debug(f'{request.path} waiting on start')
|
||||||
|
await controller.app.controllers_have_started.wait()
|
||||||
|
log.debug(f'{request.path} resuming')
|
||||||
|
|
||||||
|
|
||||||
def _make_handler(controller, definition, implementation, serializer,
|
def _make_handler(controller, definition, implementation, serializer,
|
||||||
serialize_query_args):
|
serialize_query_args):
|
||||||
def_sig = inspect.signature(definition)
|
def_sig = inspect.signature(definition)
|
||||||
|
@ -134,18 +155,8 @@ def _make_handler(controller, definition, implementation, serializer,
|
||||||
args['context'] = context
|
args['context'] = context
|
||||||
if 'request' in impl_params:
|
if 'request' in impl_params:
|
||||||
args['request'] = request
|
args['request'] = request
|
||||||
if not getattr(
|
await check_controllers_started(
|
||||||
definition, 'allowed_before_start', False):
|
definition, controller, request)
|
||||||
# Most endpoints should not be responding to requests
|
|
||||||
# before the controllers have started, that's just bound to
|
|
||||||
# be a big pool of timing bugs that we want nothing to do
|
|
||||||
# with. A few chosen methods should be safe, so allow
|
|
||||||
# those to opt-in. Everybody else blocks until the
|
|
||||||
# controllers complete their start().
|
|
||||||
if not controller.app.controllers_have_started.is_set():
|
|
||||||
log.debug(f'{request.path} waiting on start')
|
|
||||||
await controller.app.controllers_have_started.wait()
|
|
||||||
log.debug(f'{request.path} resuming')
|
|
||||||
result = await implementation(**args)
|
result = await implementation(**args)
|
||||||
resp = web.json_response(
|
resp = web.json_response(
|
||||||
serializer.serialize(def_ret_ann, result),
|
serializer.serialize(def_ret_ann, result),
|
||||||
|
|
|
@ -128,7 +128,11 @@ class AdController(SubiquityController):
|
||||||
def interactive(self):
|
def interactive(self):
|
||||||
# Since we don't accept the domain admin password in the autoinstall
|
# Since we don't accept the domain admin password in the autoinstall
|
||||||
# file, this cannot be non-interactive.
|
# file, this cannot be non-interactive.
|
||||||
return True
|
|
||||||
|
# HACK: the interactive behavior is causing some autoinstalls with
|
||||||
|
# desktop to block.
|
||||||
|
# return True
|
||||||
|
return False
|
||||||
|
|
||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
super().__init__(app)
|
super().__init__(app)
|
||||||
|
|
|
@ -364,7 +364,7 @@ class NetworkController(BaseNetworkController, SubiquityController):
|
||||||
if state == WLANSupportInstallState.INSTALLING:
|
if state == WLANSupportInstallState.INSTALLING:
|
||||||
self.pending_wlan_devices.add(dev)
|
self.pending_wlan_devices.add(dev)
|
||||||
return
|
return
|
||||||
elif state in [WLANSupportInstallState.FAILED.
|
elif state in [WLANSupportInstallState.FAILED,
|
||||||
WLANSupportInstallState.NOT_AVAILABLE]:
|
WLANSupportInstallState.NOT_AVAILABLE]:
|
||||||
return
|
return
|
||||||
# WLANSupportInstallState.DONE falls through
|
# WLANSupportInstallState.DONE falls through
|
||||||
|
|
|
@ -495,10 +495,10 @@ class FilesystemView(BaseView):
|
||||||
return TablePile(rows)
|
return TablePile(rows)
|
||||||
|
|
||||||
def _build_buttons(self):
|
def _build_buttons(self):
|
||||||
self.done = Toggleable(done_btn(_("Done"), on_press=self.done))
|
self.done_btn = Toggleable(done_btn(_("Done"), on_press=self.done))
|
||||||
|
|
||||||
return [
|
return [
|
||||||
self.done,
|
self.done_btn,
|
||||||
reset_btn(_("Reset"), on_press=self.reset),
|
reset_btn(_("Reset"), on_press=self.reset),
|
||||||
back_btn(_("Back"), on_press=self.cancel),
|
back_btn(_("Back"), on_press=self.cancel),
|
||||||
]
|
]
|
||||||
|
@ -524,7 +524,7 @@ class FilesystemView(BaseView):
|
||||||
# This is an awful hack, actual thinking required:
|
# This is an awful hack, actual thinking required:
|
||||||
self.lb.base_widget._select_first_selectable()
|
self.lb.base_widget._select_first_selectable()
|
||||||
can_install = self.model.can_install()
|
can_install = self.model.can_install()
|
||||||
self.done.enabled = can_install
|
self.done_btn.enabled = can_install
|
||||||
if self.showing_guidance:
|
if self.showing_guidance:
|
||||||
del self.frame.contents[0]
|
del self.frame.contents[0]
|
||||||
guidance = self._guidance()
|
guidance = self._guidance()
|
||||||
|
|
Loading…
Reference in New Issue