Connects the new controllers to server and client.
Higher level constructs are now aware of the new endpoint.
This commit is contained in:
parent
fdc43496f5
commit
20b60d6f98
|
@ -61,6 +61,7 @@ class SystemSetupClient(SubiquityClient):
|
|||
|
||||
controllers = [
|
||||
"Welcome",
|
||||
"WSLSetupOptions",
|
||||
"WSLIdentity",
|
||||
"WSLConfigurationBase",
|
||||
"Summary",
|
||||
|
|
|
@ -18,12 +18,14 @@ from .identity import WSLIdentityController
|
|||
from .wslconfbase import WSLConfigurationBaseController
|
||||
from .summary import SummaryController
|
||||
from .wslconfadvanced import WSLConfigurationAdvancedController
|
||||
from .wslsetupoptions import WSLSetupOptionsController
|
||||
|
||||
from subiquity.client.controllers import WelcomeController
|
||||
|
||||
|
||||
__all__ = [
|
||||
'WelcomeController',
|
||||
'WSLSetupOptionsController',
|
||||
'WSLIdentityController',
|
||||
'WSLConfigurationBaseController',
|
||||
'WSLConfigurationAdvancedController',
|
||||
|
|
|
@ -24,6 +24,7 @@ from subiquity.server.types import InstallerChannels
|
|||
|
||||
from .wslconfbase import WSLConfigurationBaseModel
|
||||
from .wslconfadvanced import WSLConfigurationAdvancedModel
|
||||
from .wslsetupoptions import WSLSetupOptionsModel
|
||||
|
||||
|
||||
log = logging.getLogger('system_setup.models.system_setup')
|
||||
|
@ -57,6 +58,7 @@ class SystemSetupModel(SubiquityModel):
|
|||
self.packages = []
|
||||
self.userdata = {}
|
||||
self.locale = LocaleModel(self.chroot_prefix)
|
||||
self.wslsetupoptions = WSLSetupOptionsModel()
|
||||
self.identity = IdentityModel()
|
||||
self.network = None
|
||||
self.wslconfbase = WSLConfigurationBaseModel()
|
||||
|
|
|
@ -26,6 +26,7 @@ from .wslconfbase import WSLConfigurationBaseController
|
|||
from .wslconfadvanced import WSLConfigurationAdvancedController
|
||||
from .configure import ConfigureController
|
||||
from .shutdown import SetupShutdownController
|
||||
from .wslsetupoptions import WSLSetupOptionsController
|
||||
|
||||
__all__ = [
|
||||
'EarlyController',
|
||||
|
@ -39,4 +40,5 @@ __all__ = [
|
|||
'WSLConfigurationBaseController',
|
||||
'WSLConfigurationAdvancedController',
|
||||
'ConfigureController',
|
||||
'WSLSetupOptionsController',
|
||||
]
|
||||
|
|
|
@ -196,6 +196,8 @@ class ConfigureController(SubiquityController):
|
|||
log.error("Packages list in dry-run should never be empty.")
|
||||
return False
|
||||
|
||||
log.debug('%s ignored for testing.',
|
||||
self.model.wslsetupoptions.wslsetupoptions)
|
||||
packs_dir = os.path.join(self.model.root,
|
||||
"var/cache/apt/archives/")
|
||||
os.makedirs(packs_dir, exist_ok=True)
|
||||
|
@ -220,7 +222,15 @@ class ConfigureController(SubiquityController):
|
|||
log.info("No missing recommended packages. Nothing to do.")
|
||||
return True
|
||||
|
||||
cmd = [aptCommand, "install", "-y"] + packages
|
||||
cmd = []
|
||||
if self.model.wslsetupoptions.wslsetupoptions.\
|
||||
install_language_support_packages is True:
|
||||
cmd = [aptCommand, "install", "-y"]
|
||||
|
||||
else:
|
||||
cmd = ["/usr/bin/apt-mark", "install"]
|
||||
|
||||
cmd = cmd + packages
|
||||
acp = await arun_command(cmd, env=env)
|
||||
|
||||
return acp.returncode == 0
|
||||
|
|
|
@ -31,6 +31,7 @@ INSTALL_MODEL_NAMES = ModelNames({
|
|||
"wslconfbase",
|
||||
},
|
||||
wsl_setup={
|
||||
"wslsetupoptions",
|
||||
"identity",
|
||||
},
|
||||
wsl_configuration={
|
||||
|
@ -51,6 +52,7 @@ class SystemSetupServer(SubiquityServer):
|
|||
"Reporting",
|
||||
"Error",
|
||||
"WSLLocale",
|
||||
"WSLSetupOptions",
|
||||
"WSLIdentity",
|
||||
"WSLConfigurationBase",
|
||||
"WSLConfigurationAdvanced",
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
WSLSetupOptions provides user with options to customize the setup experience.
|
||||
"""
|
||||
|
||||
from gettext import install
|
||||
from urwid import (
|
||||
connect_signal,
|
||||
)
|
||||
|
@ -33,15 +32,6 @@ from subiquity.common.types import WSLSetupOptions
|
|||
|
||||
|
||||
class WSLSetupOptionsForm(Form):
|
||||
def __init__(self, initial):
|
||||
super().__init__(initial=initial)
|
||||
connect_signal(self.install_language_support_packages.widget, "change",
|
||||
self.toggle_help)
|
||||
|
||||
|
||||
=======
|
||||
class WSLSetupOptionsForm(Form):
|
||||
>>>>>>> 18290ac4 (Fixed help strings)
|
||||
install_language_support_packages = \
|
||||
BooleanField(_("Install packages for better language support"),
|
||||
help=_("Not recommended for slow internet connections."))
|
||||
|
|
Loading…
Reference in New Issue