- Similar to the refactorings in Calamares proper, just split out
collecting the search paths into a static function. This makes
it a little easier to find places that will need expansion for
more-than-one-config-directory.
Switching to INSTALL_CONFIG=OFF breaks tests by not having them
in the build directory. Some logic was coupling not-installing
to not-using-in-build-dir too closely.
This is the start of a release script. The idea is to automate
a whole bunch of the steps documented in ci/RELEASE.md, so that
a release becomes more straightforward. Assumptions abound:
basically this is going to work on my workstation, and not
on any other.
- Make *mandatory* optional (and default to false); this
allows shorter lists of entries
- Allow degenerate entries which are just a name
(which have *mandatory* set to false as well).
SEE #992
- Allow just a name entry, instead of requiring an object
entry; this makes "foo" equal to { name: "foo", runlevel: "default" }
and simplifies more for the straightfoward case of #974.
- Based on comments from #974, follow the configuration
scheme from services-systemd, so with separate lists
"services" and "disable". This ties it **slightly**
less closely to the commands passed to rc-config.
- If runlevel isn't set (at all) then use "default". For
most systems that do not use multiple runlevels, this
simplifies the configuration to just a list of service names
to add or delete.
- Document the functions some more
- Only "state" (i.e. action) "add" and "del" make sense,
avoid calling rc-update for other keys (e.g. typo's).
This matches the documentation, although there might be
other actions that make sense (see also services-systemd,
with its enable, disable and mask actions).
- 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).