Read, then write, the NM file. Add a note about how we might
handle this better. Rename live_user() function to give it
a verb (and avoid UnboundLocal when using a variable of the same name).
This class doesn't really set a pointer -- it is a scoped assignment
through a pointer, which **can** set a value on destruction (when
it leaves scope). Rename it.
While here, extend the API so that it can do an assignment to the
underlying object **now**, while also doing a scoped assignment
later when it leaves scope. This makes some code a bit easier
to read ("in this scope, X is now <v> and then it becomes <v'>")
This class was used only once, and is confusing because
the assignment happens always, but to the opposite value
as what was visible. It can be replaced with other
scoped assignment, instead.
Removes the tests for it, too.
- when an emergency strikes, log the modules that are skipped
with a Once, but if an emergency module runs, refresh that
Once so that the function header is printed again -- to
distinguish JobQueue debugging from the logging from the
emergency module.
This is in response to the issue, and cleans up a bunch of code,
but does not actually resolve the issue (because I can't quite
tell what the issue should be).
SEE #1788
- iterate over the lines of the source file, rather
than over indexes, and make clear that the hooks, modules and files
lines are replaced, rather than merged.
- this calls write() more often, but it's only a few lines
- don't chain directly from modify_mkinitcpio_conf() to the
function that writes the file write_mkinitcpio_lines();
split into "figure out what needs to be written" and calling
that writing-function, so that we can test / check / log
if needed between the two.
- put the system-information and -detection functions at top
and the "do the actual work" things below
- don't mix the boolean do-we-use-this flags with the
lists of files and modules which are the important
parts of modify_mkinitcpio_conf