- With refactored code, introducing new kinds of actions
is very few lines of code. Allow disabling targets
(services was already possible). Allow masking units,
but as a special case require the complete name.
FIXES#975
- The three steps of modifying services in the target
system do basically the same thing, so factor out
the loops and logging into a systemctl() function.
- Log to warning() instead of just debugging, on failure.
- There is more to failing out of loadModules() than just
emitting modulesFailed, so instead share the failure
code with the code after loading modules -- but don't load any.
- Module dependency-checking is done in two phases:
first, catch any unknown modules that are listed
in *requiredModules* and bail out before loading
anything. Second, check that the modules required
by X occur before X in the sequence.
- The value set in module.desc was never stored for use,
but isn't an attribute of the instance, either. It belongs
with the descriptor, in ModuleManager.
If USE_<foo> is given a value that doesn't match **anything**,
then bail out. Since USE_* is an explicit distro choice for a
specific implementation, it's an error if that implementation
is not there.
When there are multiple modules doing a thing and it really only
makes sense to have one of them in a given Calamares compilation,
the USE_<foo> variables allow you to select one, while ignoring
all the other implementations. If USE_<foo> is not set, all
implementations are included (as usual).
- The examples files are not harmless, so distro's should take a
explicit decision to install the config examples (instead of
putting files in /etc/calamares).
- Switch INSTALL_CONFIG to OFF by default **or**
- Make all the example configurations "harmless" or trigger
specific failure modes in the modules.
- Document that distro's should be creating their own set
of config and settings files and using those, rather than
relying on upstream example configs.
- Implement the required: module description field. This
would have prevented the plymouthcfg / grub failure fixed
in 3.2.1.
- Think about improving the available OPTIONs at a CMake level
to auto-fill SKIP_MODULES (e.g. it only makes sense to pick
**one** services module).
- Rename services to services-systemd
- Improve the example file in services-systemd
- Document it
- Make the sample harmless
- (Rougly) merge #972#975
- Merge OpenRC module
- Only with documentation
- Use the generalized module from #966
- Use YAML-CPP API for finding out if a node has a value at all.
- Asking for Type() of an undefined or NULL node throws an
exception, so the existing code didn't **actually** catch
cases where a required setting wasn't set at all.
- A valid line (as explained in the comments at the top of
the locale.gen file) is <locale> <encoding> (two fields),
so lines with more than two fields can't be valid locale-
listing lines. For them, pretend they name locale "",
which won't be matched.
- Improved debug-logging
- Fix the actual problem of listing locales more than once,
by listing them all, uniqified, at the end, with an explanitory
comment in the generated file.
- Be more accepting of what constitutes a locale-line; this allows
spaces before and after the `#` comment sign, but because we're
uniquifying, this doesn't cause duplicates.
- Because we write the enabled locales at the end, the full file
comment-header is retained un-mangled (instead of accidentally
enabling a locale mentioned as an example there).
Testing for existence of a file in the live system, and then
copying it in the target system, is not a recipe for success.
- Fix the restore-from-backup part.
- Document that your live and target system must both have
/etc/locale.gen if you want this to work at all.
just lines which might be comments, might be human-readable-text, or
might be example locales. Instead of modifying any comment-lines,
write enabled locales at the bottom of the file, while matching
very loosely with the comment lines from the file.
FIXES#940 (insofar as that is fixable)