QLocale::name() doesn't include script information, and if it did
it would probably use sr_RS@Latin; when searching for translation
files it won't consider dropping just the country.
- Don't insert a space before the output of a process
- To do this, suppress space and quoting on the output, and to do
that move the labeling-output for warnings and errors into
the constructor (so that an idiomatic .nospace() does the right thing).
- Settings is just a settings class, no UI involved, so
move to libcalamares where it can be used also from
system helpers.
- YAML utilities are useful at a lower level of the stack, too.
- Use DebugRow for one-row-at-a-time output with continuations.
- Use DebugList for one-item-per-line with continuations.
- Use DebugMap for one-row-at-a-time output of a QVariantMap.
- Don't bother with the address of the main thread
- Do put a marker on restart into the log file
- Do put the Calamares version into the log file (previously, the version
was printed through cDebug() before the log file was opened, so it was
lost to the on-disk log).
The install-bits branch commit 83639b182b
dropped .so-versioning for libcalamares and the creation of the Python-
support symlink. This broke KDE Neon dev-unstable because the embedded
Python can no longer find libcalamares.
Installing unversioned .so's straight to LIBDIR is also not a good thing
(according to Debian), so revert to the original scheme with versioned
.so and a Python-support symlink.
Medium-term fix is to install unversioned straight into LIBDIR/calamares
and fix up the RPATH for the executable.
- Applies to libcalamares and libcalamaresui.so, install with no
version, just the bare .so. Since Calamares doesn't do versioning
anyway, and its plugins should be re-compiled for any change,
putting them in lib as unversioned .so's should make Calamares
happy and silence lintian.
- The Python testmodule script can end up calling in to System
methods (via System::instance()). This is unusual, and the
System instance has not been created at that point.
Now, create an instance and warn about it.
- Move logging-levels to an enum
- (re-)Order logging-levels so that the normal debug statement is
not the most-important (lowest level).
- Drop using namespace std;
These additional pointers were introduced for translations,
and needed their own tricks to get lupdate to recognize the
strings. Using QCoreApplication::translate() removes the
need to a QObject to provide context. Drop the now-unneeded
parameters.
Instead of using tr and some macro hacks to get lupdate to
recognize the translation, instead use QCoreApplication::translate()
which takes its own context for translation.
- Replace plain StringList with a list of <String, timeout> pairs,
and run that instead. All code paths still use the default 10sec
timeout and there's no way to change that.
- Copy stdout from timed-out process into the output variable,
instead of just dumping it into the log file. This will
improve the user experience, too, because they will get some
feedback / explanation of what the process has done.
- Remove some superfluous intermediate defines
- baseFactory was not used (always Calamares::PluginFactory)
- Move DECLARATION and DEFINITIONS apart
- CALAMARES_PLUGIN_FACTORY_DEFINITION was redefined (identically)
- CALAMARES_PLUGIN_FACTORY_DECLARATION was redefined (identically)
- __VA_ARGS__ was constant
- Move CommandList so it can be used from more modules than
just ShellProcess
- Allow a CommandList to run itself. This centralizes
code for executing one or more commands and simplifies
the ShellProcess module.
Various small cleanups:
- mention instance id in log message
- code formatting / style
Back targetEnvCommand() with a more general runCommand()
that takes an argument selecting the location to run
the command in. This allows us also to use the same
API for running processes in the host during install,
as we do for running them in the target system.
One reason for this change is wanting to run (user-specified)
commands and independently from the global dontChroot setting,
run those commands in the live system or the target.
This changes the ABI of the DLL, since targetEnvCommand()
is no longer exported. Plugins will need to be recompiled.
- refactor targetEnvCommand() into more general runCommand().
- While here, allow host system commands to run even if
there is no global storage.
- provide convenience accessors for ProcessResult members
- Move explanation of process errors out of ProcessJob
- Move from ProcessJob to ProcessResult, so it can be
reused outside of ProcessJob (e.g. from ShellProcessJob).
- Add some convenience functions, too.