This strips out the === from KPMCore reports so that they are
more readable when presented in the error dialog. Introduces
some code-conveniences, too, but that is all under-the-hood.
- Use the Calamares support-functions for running lsblk and mount
(these might need to have privilege support if Cala is not
running as root, so this is future-proofing)
Most *partition* module jobs run an operation and turn that into
a JobResult -- ok if it succeeds, and with the report text otherwise.
Factor it out into a separate method that can be used as shorthand.
Put the Item class in a separate header; give it functionality
to create itself from Variants (e.g. from the configuration data)
and to run itself (do whatever the item is supposed to do).
This makes the polymorphic approach unnecessary: we just have
items that are sufficiently smart.
This moves do-a-thing to the Item, while the Job now has one
job: be a loop around creating Items and running items.
The filenames don't matter, but the contents of the file are also
UTF-8, and depending on the default encoding of the Python
interpreter, this can fail on non-ASCII characters in the
file. Set the encoding explicitly while reading and writing
the NetworkManager configuration files.
FIXES#1848
- modules with no configuration should be marked 'noconfig',
but umount is special: it has no **useful** configuration
(maybe no **non-deprecated** configuration), but isn't
marked 'noconfig' **yet**.
- this module needs work to handle BTRFS special-cases *anyway*
- limited in scope, few options: port it while doing the
special-cases
So far, this is just a C++ stub.
SEE #1659#1644
The translations apply to labels and a tooltip, which depends on
the partition-table type. Move the strings together and make
the whole range of the switch explicitly.
- some switch statements handle a bunch of items explicitly,
then default the rest. Clang complains about that. Turn off
the warning for these specific switches, since there's dozens
of values that simply do not need to be handled.