- Calculate the length once at the start -- this is because
future work will modify the queue rather than just iterating
over it.
- Describe the slightly-surprising progress-percentage calculation.
- provide complete information for feature_summary
- set the right API version when building libcalamares
- report the beta version number when it's wrong
- The InternalManager object should have at most one living
instance at a time.
- getInternal() hands out shared_ptr<>s to the one living instance,
or creates a new one.
- The creation of a new InternalManager shouldn't count as a reference
to it, and it mustn't be deleted after the shared_ptr<>s have done
their work.
- So static shared_ptr<InternalManager> was the wrong choice,
since that leads to double deletes.
- While here, be a little more chatty when loading KPMCore.
- Starting to centralize utility code for partitioning into
libcalamares instead of scattered and weirdly shared between
modules.
- This particular commit breaks compiling the modules, though.
- From an exec section, next() is called automatically when
all the jobs in that section are done.
- If there **is** no next section (e.g. there's no finished
page to show after the exec), then m_steps.at() would assert
on an out-of-range index.
- Introdcuce a helper predicate isAtVeryEnd() which handles both
out-of-range and normal at-the-end scenarios.
- If there's no page following the exec section, stay with the
slideshow but update buttons to match the normal last-page
behavior, and don't ask about cancel (since we're done).
- This avoids processes that wait on stdin, and e.g. improves
reaction to having just "cat" (no file) in a command, or
a package manager that asks for input.
- JobQueue is only needed to get global settings, which are needed
when running in the target; for host commands, allow running
without a queue.
- Settings is needed for the value of debugsettings; assume if
there's no settings object, that we're in a test and should
print debugging information.
- This is the same as EFAIL: a block is indented as if it's a multi-
line else block. This isn't Python though, and the return always
applies.
- Add the necessary braces.
- Apparently noone uses this code path (until ProcessJob was re-
factored to do so).
- Use the system runCommand() instead of a 90% copy of it.
This **does** change the overall command to `env /bin/sh -c`
rather than running only `/bin/sh -c`, though.
- Replace magic numbers like -3 with named enum values
(NoWorkingDirectory, for -3).
- Downside is big-ugly static_casts, but that's what you get
for having an int as return value for processes.
- This solves a crash where the thread is destroyed while still
running (e.g. cancelling during install).
- The thread might not cooperate in being terminated, but then we
have a bigger problem anyway (and Calamares will still crash on
exit).
FIXES#1164