Recent changes in GUI turned possible to have that field as None,
leading to a crash.
This avoids the crash while preserving the default behavior of
installing the language packs.
That variant would only apply configs if in autoinstall.
There are no more screens available related to those settings in
wsl_setup.
Reconfiguration variant is the only one able to write that file.
setuptools declares a certain number of entry points that use the main
function of the associated component. That said, now that main is an
async function, it does not work. There seems to be no way to tell
setuptools to wrap the call to the entry point with asyncio.run so we
need to revert to a synchronous main function.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Where we don't have a proper snapd support.
Approach similar to the one used in UDI.
For the case where we have Subiquity snap, but not UDI.
The script added is a stripped version of the UDI one.
Removed code related to:
- GTK and GDK;
- GI repository;
- Xkb;
Preserved:
- Python;
- XDG directory definitions;
- font config;
to the WSLSetupOptions controller.
Misuse of the default_loader().
That's meant for loading /etc/wsl.conf.
WSLSetupOptions is by design not related to that config file.
Intended to receive options that affect the setup process.
and won't be written to /etc/wsl.conf
Options relative to that conf file are handled by WslConfBase and
WslConfAdvanced.
Currently only the option for skip installing language packs is
available.
With the plan to call curtin multiple times where each invocation has a
specific purpose, we want the client to have a simple way to monitor the
status of the installation.
Instead of defining new application states for each stage, we will
report the more generic WAITING / RUNNING states in a loop until we get
to the final stages of the installation.
To start with, we are dropping POST_WAIT and POST_RUNNING in favor or
WAITING and RUNNING.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Because the storage views lean on the implementation of
setup_password_validation from the identity screen, we were forced to
use a form with fields named "password" and "password_confirm".
This makes the code confusing because we use the "passphrase"
terminology in the storage forms.
We now leave up to the caller to specify which fields he wants to be
part of the validation ; instead of making him provide the full form.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
lang-packs post-install hook executes locale-gen.
For certain languages a matrix of locales is generated.
Re-running locale-gen regenerates not only the locale we wanted,
but the whole matrix, causing further delays.
We can save up to 40s (tested on my laptop) by skipping locale-gen if
apt succeeded.
Still useful to run it unconditionally i dry-run since apt won't execute
any post-install hook.
We won't ship systemd officially in 22.04, hence remove it from the UI.
However it's still there and distributed and can be enabled manually.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
update requires root access to the machine and there is no --simulate
option so skip it in dry-run mode.
Co-authored-by: Didier Roche <didrocks@ubuntu.com>