Introduce the notion of emergency modules and emergency jobs.
Initial use will probably center around the preservefiles module,
and possibly umount.
FIXES#928
- After a failure, skip non-emergency jobs.
- After running all emergency jobs, then emit failure message.
- In log, distinguish emergency and non-emergency jobs.
Any job can be an emergency job; emergency modules spawn
emergency jobs (but conversely, a non-emergency module
can spawn an emergency job explicitly).
A potentially emergency module is one that has EMERGENCY
(in CMake) or emergency: true (in module.desc) set.
Any such module must also set emergency: true in the
configuration of the module. This is to allow for
instances of a module that **don't** run as emergency
modules, alongside actual emergency ones.
Although the NO_INSTALL keyword could be specified for
Calamares plugins, it didn't actually do anything. Now
it does. A NO_INSTALL module does not install configs
or libraries.
- In many cases, using QLatin1String is a de-optimization, when
applied to a C string literal. Kevin Kofler pointed out that
those should basically all be QStringLiteral, instead. (Compile
tests with -O3 show that in the optimized object file, the
code size difference is negligible).
- Drop the explicit constructor entirely in cases where we're calling
QProcess::execute(), for consistency.
- Do a little less messing around in the mapping of keyboard locales
to keyboard map names.
As Kevin pointed out, there's an extra conversion involved here --
although with -O3 the difference boils away leaving only a call
to a from-ASCII helper or a from-Latin1 helper.
While here, coding-style.
The plymouthcfg Calamares module is optional. Distributions which
write filesystems with a full plymouth configuration won't even
want to use it (see plymouthcfg docs).
However, now grubcfg depends on plymouthcfg to run because
the globalstorage value to trigger setting 'splash' in grub,
is set in the plymouthcfg module.
Just check for plymouth existence separately in the grub module.
Fixes ea1c8a0e5d
- The new format was introduced in Qt 5.7, and Qt 5.9 introduced
the --format-version flag to rcc to switch back to the reproducible
format 1. For distro's with Qt 5.7, don't use the new flag.
- Reported from Neptune Linux, #979
Since this is a new language, it is currently 0% translated.
That is why it goes into _tx_bad. It will move to one of the
other categories once some translation has happened. Add the
(still empty) Transifex files already.
- Add a TODO for allowing modules to come from somewhere other
than the module loader (this would allow "internal" modules
that are always present)
- Warnings are warnings
- Add -v (verbose) and -b (load via bytearray)
- Verbose prints the keys read from the file,
- Bytes reads via an indirection through QByteArray, like Settings does
- Collect the failed modules, instead of bailing out on the first one
(this also prevents crashes caused by quit() called from a timer).
- Introduce a slot to report on failed module loading (no UI yet).