- allows you to use -- at runtime -- values from os-release in the
branding file.
- WIP because the only machine I have with sufficiently new KF5
is the FreeBSD box.
- Do the checking for IsMap inside loadStrings() and use
YAML::Exception to get to bail() (since we're already dealing
with exceptions here, no extra costs). This tidies up the code
somewhat.
- Don't need an extra indirection from WITH_KF5Crash to WITH_KCRASH,
just use the cmakedefine directly.
- Since the setting is only used in main.cpp, move the define
down there and remove cmakedefine entirely.
- Checking if the **next** step is an execute-step is a little
weird, so make the API more general (and add the +1 to indexes
where it was using NextWillExecute before).
- The sub-directories under libcalamares (e.g. Utils, ..)
all live in namespace CalamaresUtils (well, except for Logger).
The services (e.g. subdirs other than utils/) live in their
own nested namespace, so partitioning should go into
CalamaresUtils::Partition for consistency.
- Clang 8 can detect that there is no need for a return if all
previous paths already return. GCC 8 does not. Clang warns if
the unreachable return is there, GCC errors out if it isn't.
- Introduce a hack NOTREACHED that comments-out on Clang, and
marks as unreachable (but still present) on GCC.
- This might go away with an [[unreachable]] annotation or
similar.
- Although None will be filtered out already by unitsComparable(),
include it in the switch to avoid a warning .. then we can
drop the post-switch return since the switch covers all possible
values of the enum.
- Use unitsComparable where applicable
- Use SizeUnit instead of unit_t -- since this is a template
specialization, we have the more meaningful type name to
use, instead of the generic one.
- Not all kinds of units are comparable. Introduce a method
in PartitionSize to check for comparability (this could
also be a free method, but seems more tidy here because it
is specifically about comparing in the context of partition sizes).
- the switch handles all values of the enum and the compiler should
be smart enough to know that (therefore default isn't needed,
nor the return afterwards).
- Declaring namespace A::B is a C++17 extension, and Calamares
is C++14. Split the namespace declarations.
- While here, fix extra const warning as well.
src/modules/bootloader/main.py (install_secureboot): Run the configured
grubMkconfig command (should be `grub-mkconfig` or `grub2-mkconfig`) to
create `/boot/efi/EFI/$efi_bootloader_id/grub.cfg`. The sb-shim is just
a chainloader to GRUB 2, which expects a grub.cfg in that location, so
something has to create it or the installed system will not boot beyond
the GRUB rescue shell.
(install_grub): Fix misleading comment above the grubMkconfig call: it
is not the file specified in grubCfg that should be already filled out
by the grubcfg job module, that file is written by `grub*-mkconfig`
using `/etc/default/grub` as the input file. It is that input file
`/etc/default/grub` that should already be filled out by the grubcfg job
module. (The same input file is used in install_secureboot.)