PARTITION_UNSAFE is a debug mode. It is not used in
production, because it allows you to pick an install
device that would be dangerous (e.g. the current / device).
Existing code kept two copies of a list of pointers,
and deleted pointers from one of the lists and returned
the other -- which now contains dangling pointers.
Refactor by applying suitable lambdas to a single
copy of the list; this avoids copying the list so
there is no danger of dangling pointers.
The only acceptable versions of clang-format are 8 and 9 for now
(until another round of big-churn-from-formatting, at which point
we'll update the required version).
clang-format-9 says:
SpacesInSquareBrackets (bool)
If true, spaces will be inserted after [ and before ]. Lambdas
or unspecified size array declarations will not be affected.
clang-format-10 changes part of that to:
Lambdas without arguments or unspecified size array
declarations will not be affected.
This means that 9 will only allow `[name]` for captures, and 10
will only allow `[ name ]` for captures, so they ping-pong all
the lambda's in the codebase back and forth. Just don't.
Various clang-format versions have different defaults and
don't understand the same options, so adjust to having
files per-formatting-version to patch things up.
- duplicate the file to .base
- drop 10-and-later setting that was commented out
- specific setting for lambda-formatting (this seems to be the default)
- The log **file** got every QDebug object, while stdout only
got the ones of sufficient logging level. A CDebug object checks the
logging level before writing anything -- so those already were
consistent, but any qDebug() in the program (not cDebug()!) would
reach the writing-function anyway, and so log to the file.
Fix this weird inconsistency by checking log-level just once,
for both writes.
- Map QtMsgType -- used by qDebug() and qWarning() -- to levels used
by Calamares in a consistent fashion.
- Drop unused log levels (INFO, EXTRA unused in any Calamares code).
The generic-build step runs an install to the host system; for artifact-
generation, we need it all centralized in a stage/ directory. Do that
separately for the KDE neon builds that produce the artifact.
The bootloader model knows about both rows and
devices, so we can look up both at once. The
existing implementation as a non-member was rather
sketchy and wasn't used except as support for
restoreSelectedBootLoader().