Adriaan de Groot
10da2c257d
Merge pull request #2009 from calamares/issue-1940
...
[libcalamares] Remove translation-languages define
2022-07-18 23:03:22 +02:00
Adriaan de Groot
eccfdbd986
[libcalamares] Mark a TODO that is causing build failures
2022-07-10 13:38:48 +02:00
Adriaan de Groot
3360ad612e
[libcalamares] Use Calamares interface-library to kpmcore
2022-07-10 13:38:48 +02:00
Adriaan de Groot
ab813b607f
CMake: move kpmcore support into the helper-CMake-module
...
- find the dependencies just once
- fix the interface for kpmcore so it can find its own
includes (this is mostly relevant for Debian)
2022-07-10 13:38:48 +02:00
Adriaan de Groot
170a5a8697
[libcalamares] Factor out the list of translations
...
The list of translation codes lives in one place, make it accessible
through a function in Calamares::Locale.
2022-07-03 00:05:40 +02:00
Adriaan de Groot
18a3092aa1
[libcalamares] Use namespace Calamares
...
The distinction CalamaresUtils and Calamares is old-fashioned,
since we can use nested namespaces (and already do) for a lot
of things; make libcalamares/locale/ a bit more consistent
by using namespace Calamares::Locale for everything.
2022-07-02 23:19:44 +02:00
Adriaan de Groot
d7e35d2ad2
[libcalamares] Use newly-generated table of language names
2022-07-02 23:19:44 +02:00
Adriaan de Groot
f53f83be56
CMake: create header with available languages
2022-07-02 23:19:44 +02:00
Adriaan de Groot
2322f12b59
[libcalamares] Remove translation-languages define
...
This doesn't compile, since it doesn't provide any replacement
for the translations define.
2022-07-02 17:42:02 +02:00
Adriaan de Groot
273941f451
[libcalamares] Add convenience for building macro-expanders
2022-07-02 15:56:21 +02:00
Adriaan de Groot
ee848e2367
[libcalamares] About box should show extended version if available
2022-06-27 23:48:03 +02:00
Adriaan de Groot
1c7c0b9af8
CI: apply coding style (clang-format 13)
2022-06-27 00:37:15 +02:00
Adriaan de Groot
96fb97d53a
Changes: pre-release housekeeping
...
- this would be the first 3.3 release, scripts still needed
cleanup to handle all the changes in 3.3
- support "-alpha1" kinds of designation
- support more versioning information in the headers
2022-06-26 23:49:14 +02:00
Adriaan de Groot
3a0b75a006
Merge branch '3.2.x-stable' into calamares
2022-06-19 16:05:17 +02:00
Adriaan de Groot
b11ee3abc5
[libcalamares] Add alternatives ca@valencia and ca_ES@valencia
2022-06-19 15:34:20 +02:00
Adriaan de Groot
2478570deb
[libcalamares, keyboard] Use convenience for getting current locale
2022-06-18 00:40:26 +02:00
Adriaan de Groot
d80661211c
[libcalamares] Introduce convenience for reading Locale map
2022-06-18 00:23:21 +02:00
Adriaan de Groot
42f9f07a07
[libcalamares] The spinner doesn't support rich text
2022-06-10 01:27:37 +02:00
Adriaan de Groot
9f91b50553
[libcalamares] Use Q_EMIT instead of 'emit'
2022-06-10 01:04:43 +02:00
Adriaan de Groot
821a62ffbb
[libcalamares] Add missing <memory> for std::unique_ptr
...
SEE #1972
2022-06-02 14:38:44 +02:00
Adriaan de Groot
72240d0d59
Merge branch 'work-3.3' into calamares
2022-05-29 17:22:36 +02:00
Adriaan de Groot
3e72635204
[libcalamares] Fix path-search for loading branding-translation
...
- log which path is actually being used
- there are two overloads for QTranslator::load(); the intention
was to call `QTranslator::load(const QLocale&, ...)`, but the
types of the arguments were wrong, leading to the other
overload being called, and interpreting the locale-name
(e.g. "nl") as a full filename.
Improve logging, call the "other" overload with the right parameters
and drop the not-needed ones.
FIXES #1961
2022-05-29 00:55:35 +02:00
Adriaan de Groot
4a852facb3
[welcome] Use generated about string
2022-05-23 16:57:51 +02:00
Adriaan de Groot
09255a1d9c
[libcalamares] Add a more extensible About message
...
- make the years easier to update without annoying translators
- make the maintainers extensible.
2022-05-23 16:45:23 +02:00
Adriaan de Groot
66682b3e84
Merge branch 'calamares' into work-3.3
2022-05-18 15:13:21 +02:00
Adriaan de Groot
874a0c1f38
CI: apply coding style globally again
2022-05-18 12:44:55 +02:00
dalto
152f99fb07
Remove useless emits
2022-05-13 17:24:07 -05:00
Adriaan de Groot
52e2c8c262
[libcalamares] Use stronger type, rather than comment
2022-05-10 00:30:35 +02:00
Adriaan de Groot
21aa608ce2
Merge branch 'calamares' into work-3.3
2022-05-05 23:35:53 +02:00
Adriaan de Groot
091eb9683b
[libcalamares] Give Occitan a native name
2022-05-05 15:23:54 +02:00
Adriaan de Groot
4be25e2f70
[libcalamares] Special-case the regions through the lookup-table as well
2022-05-05 15:20:29 +02:00
Adriaan de Groot
2de7736291
[libcalamares] Replace locale special-cases by a table
...
Replace the function with a table-driven approach,
since that is somewhat easier to extend to more
languages.
2022-05-05 14:42:12 +02:00
Lt-Henry
a8857e51f4
Improving special-case language detection
2022-05-05 11:12:29 +02:00
Adriaan de Groot
4713f0be42
Merge branch 'calamares' into work-3.3
2022-05-04 11:59:46 +02:00
Adriaan de Groot
1f7b2a3d2d
[libcalamares] Remove CommandList destructor
...
The destructor was just the default one, but declaring it
blocks the default copy constructor.
2022-05-04 11:38:42 +02:00
Adriaan de Groot
792c4914b0
[libcalamares] Compare translation IDs, extend find()
...
Allow naive comparison of translation IDs (e.g. "ca@valencia"
against other IDs) and make it easier to find one.
2022-05-04 10:35:43 +02:00
Adriaan de Groot
5307976179
[libcalamares] Special-case startup for some languages
2022-05-04 10:10:35 +02:00
Adriaan de Groot
d7459e2bfe
CMake: modernize optional parts of libcalamares
2022-04-25 15:23:27 +02:00
Adriaan de Groot
585d06494e
CMake: fix linking with modern Python and Boost
2022-04-25 14:47:18 +02:00
Adriaan de Groot
b129cb0786
[libcalamares] Match roles from model to Qt standard roles
2022-04-20 16:25:28 +02:00
Adriaan de Groot
07f4ec529b
[libcalamares] Clean up requirements model API
...
- don't need friends
- made modify-the-model API public where it makes sense
- improve naming
2022-04-20 15:39:53 +02:00
Adriaan de Groot
7e5df42fc0
Merge branch 'issue-1924' into work-3.3
...
This is a rather clunky implementation of re-check requirements.
"Clunky" because the UI parts are re-created each time, rather
than fishing from a model of checked (or unchecked) requirements.
The Widgets parts should be updated to use a full model, rather
than the recreate-list-of-Widgets implementation they have now.
Unrelated changes pull in a bunch of improvements to the
waiting spinner widget.
2022-04-16 12:34:40 +02:00
Adriaan de Groot
a9e098b0b4
[libcalamares] Allow resetting the requirements model
...
- When a requirements checker starts, it can reset the model
to clear it of previous entries.
2022-04-13 17:08:17 +02:00
Adriaan de Groot
bbea67ecb4
[libcalamares] Add an expand() to command lines and lists
...
- While this is primarily convenient for testing (e.g. checking
that a command is expanded the way we expect), it simplifies
some of the code because it's now clear that run() uses an
expanded copy of the command-list to do the actual work.
2022-04-13 14:08:21 +02:00
Adriaan de Groot
d76dd2f8e0
[libcalamares] Use new expander in CommandList
...
- This switches @@ROOT@@ for ${ROOT} and uses standard macro-
expansion mechanisms for the commands; undefined variables
will be logged as well.
2022-04-12 16:06:42 +02:00
Adriaan de Groot
f923dedc3f
[libcalamares] Add a word-expander
...
This is a variant on KMacroExpander, which allows for
reporting of errors after expansion.
2022-04-12 15:28:07 +02:00
Adriaan de Groot
576f244d2d
*: Chase new namespace Calamares::String
2022-04-12 14:15:52 +02:00
Adriaan de Groot
d03a8acc9d
[libcalamares] Create namespace Calamares::String
...
This is a step towards getting rid of CalamaresUtils and
using more structured namespaces overall, e.g. Calamares::String
for things related to string-handling.
2022-04-12 14:14:02 +02:00
Adriaan de Groot
82b5ca8bfc
Merge branch 'calamares' into work-3.3
2022-04-12 12:44:39 +02:00
vt
73462d9214
[libcalamares] Fix file-reading from target system
...
readTargetFile was not fully reading files because of an incorrect
EOF check. This could cause /etc/openswap.conf files to be
truncated and hibernation to fail on installed systems.
2022-04-10 19:36:38 -04:00
Adriaan de Groot
9e4b2d14cb
[libcalamares] Add a path parameter when creating descriptors
...
This allows us to print the path of a descriptor file in
error messages, which in turn makes it easier to find
problems with the descriptor files.
2022-03-28 12:29:47 +02:00
Adriaan de Groot
ec3282e15d
[libcalamares] Allow checking a Once object for repeat messages
2022-03-28 12:28:07 +02:00
Adriaan de Groot
f888cb87d1
[libcalamares] Start deprecating signed sizes
2022-03-22 15:23:24 +01:00
Adriaan de Groot
97031ea3e6
[libcalamares] The amount of memory in the system cannot be negative
2022-03-22 15:23:24 +01:00
Adriaan de Groot
99b19b9539
[libcalamares] Always log to file, sometimes to terminal
2022-03-22 12:54:54 +01:00
Adriaan de Groot
aedb55ea36
[partition] Require modern KPMCore
2022-03-21 23:44:20 +01:00
Adriaan de Groot
49c56add7d
Merge branch 'calamares' into work-3.3
2022-03-21 23:21:54 +01:00
Adriaan de Groot
7aafeec2cb
[libcalamares] Fix entry-format, it was totally bogus
2022-03-01 16:14:45 +01:00
Adriaan de Groot
2f782f18c4
[libcalamares] Fix file reading
...
- atEnd() doesn't behave as expected
- drop the textstream, not needed
- rename variables to be more descriptive
2022-03-01 16:13:25 +01:00
Adriaan de Groot
60630efa6a
[partition] Log DBus calls and switch to blocking calls to ensure they happen
2022-03-01 14:03:04 +01:00
Adriaan de Groot
c5fec83f64
[libcalamares] Fix typo
2022-02-28 11:30:36 +01:00
Adriaan de Groot
f2a6736883
[libcalamares] More chatty when DBus fails
2022-02-28 11:29:45 +01:00
Adriaan de Groot
5b40f17b9c
[libcalamares] Prep-work for supporting non-Solid automounting
2022-02-28 11:26:57 +01:00
Adriaan de Groot
7f14aa6bf1
[libcalamares] Avoid warnings about KPMCore headers
2022-02-08 16:35:23 +01:00
Adriaan de Groot
b167d8da03
[libcalamares,ui] Make KF5::CoreAddons explicit
...
- libcalamares doesn't need it anymore, because it ported away
from KPluginLoader,
- libcalamaresui does need it, because of KMacroExpander.
2022-02-08 16:13:40 +01:00
Adriaan de Groot
5160fdc26a
[libcalamares] Port away from KPluginFactory
2022-02-08 15:50:17 +01:00
Adriaan de Groot
8f769006d6
Merge branch 'calamares' into work-3.3
2022-02-08 13:28:20 +01:00
Adriaan de Groot
932ab17c9a
[libcalamares] Avoid parameter name 'stdin'
2022-02-07 12:54:16 +01:00
Adriaan de Groot
ebdcb15703
[libcalamares] Don't use reserved identifiers
2022-02-07 12:51:22 +01:00
Adriaan de Groot
660b198da0
[libcalamares] Avoid more moc warnings with recent Clang
2022-02-07 12:51:06 +01:00
Adriaan de Groot
3ea25a901e
[libcalamares] Avoid compiler warnings when stdin is defined to something else
2022-02-07 11:32:22 +01:00
Adriaan de Groot
d5c6a70442
[libcalamares] Use signed sizes
2022-02-07 11:22:13 +01:00
Adriaan de Groot
d1e4740e70
Merge branch 'calamares' into work-3.3
2022-02-02 14:41:58 +01:00
Adriaan de Groot
ffeab32403
[libcalamares] Apply coding style
2022-01-31 23:41:37 +01:00
Adriaan de Groot
80300e412c
[libcalamares] When logging extra lines to warning or error, suppress label
...
Avoid logs like
23:29:57 [2]: void Config::setConfigurationMap(const QVariantMap&)
WARNING: Configuration for *initialSwapChoice* is not one of the *userSwapChoices*
WARNING: .. Choice "small" added.
where the label is duplicated.
2022-01-31 23:27:35 +01:00
Adriaan de Groot
0070dd2c01
[libcalamares] Add a convenience for reading mtab
...
- used by umount and cleartempmounts (in future)
2022-01-18 13:22:20 +01:00
Adriaan de Groot
a93126a6d0
[libcalamares] More meaningful name for JobResult success
2022-01-17 14:19:28 +01:00
Adriaan de Groot
e6813949af
[libcalamares] Hook up Python's error() to error, rather than warning
2022-01-17 13:47:47 +01:00
Adriaan de Groot
24a881ad75
Merge branch 'calamares' into work-3.3
2021-12-24 17:01:08 +01:00
Adriaan de Groot
bc2713ccbb
[libcalamares] Add string functions for lstrip() and rstrip()-like
2021-12-08 14:08:37 +01:00
Adriaan de Groot
4611545f93
[libcalamares] Warnings-- on switch()
...
- some switch statements handle a bunch of items explicitly,
then default the rest. Clang complains about that. Turn off
the warning for these specific switches, since there's dozens
of values that simply do not need to be handled.
2021-12-07 15:42:14 +01:00
Adriaan de Groot
32da51b44c
[libcalamares] Avoid warnings in Boost::Python macros
2021-12-07 14:48:19 +01:00
Adriaan de Groot
890c17cd71
[libcalamares] Expand error-logging when creating files
2021-12-06 14:46:26 +01:00
Adriaan de Groot
6ef7acc108
[libcalamares] Add minor tests for new readTargetFile
2021-12-06 14:46:26 +01:00
Adriaan de Groot
baf8297cc4
[libcalamares] Reading a file from target system
2021-12-06 14:46:26 +01:00
Adriaan de Groot
ce23efae99
Merge branch 'calamares' into work-3.3
2021-11-30 11:39:30 +01:00
Adriaan de Groot
65488ca174
[libcalamares] More verbose when loading YAML for Python
2021-11-29 14:19:06 +01:00
Adriaan de Groot
fcbe8d3a3e
[libcalamares] API for YAML-loading from Python
2021-11-29 12:59:30 +01:00
Adriaan de Groot
7f643010b2
[libcalamares] Expose error() and warn() to Python
2021-11-29 12:26:07 +01:00
Adriaan de Groot
e9970474f5
[libcalamares] Allow Python to log an Error as well
2021-11-29 12:22:02 +01:00
Adriaan de Groot
5a4e2b73ab
[libcalamares][partition] Give RedactedName a convert-to-QString
...
- use hex-trailer
- while here, convert DebugRow to use a copy rather than a reference,
to avoid dangling references when applied to temporaries
- convert *partition* module to use the RedactedNames
2021-11-16 15:22:04 +01:00
Adriaan de Groot
152b3c333b
[libcalamares] Introduce redaction-of-names class for logging
...
- redacted names are stable inside of one run of Calamares
- random, private displays of a given string for a context
SEE #1593
2021-11-16 14:47:13 +01:00
Adriaan de Groot
7b3c4db8f0
[libcalamares] Redacted -> RedactedCommand
...
- For logging (shell) commands where a password might become visible, use
RedactedCommand. Rename it to allow for other kinds of redaction, too.
2021-11-16 14:21:46 +01:00
Adriaan de Groot
3dd02edc78
[libcalamares] Document how to interpret percents
...
- use 0..1 in floats for percentages (I suppose you could
call that a perunage, but that would be weird).
2021-11-15 23:16:58 +01:00
Adriaan de Groot
bd4bed1438
Merge branch 'calamares' into work-3.3
2021-11-09 15:31:37 +01:00
Adriaan de Groot
5e6d292235
FIXUP
2021-11-05 16:31:47 +01:00
Adriaan de Groot
faf1d68d32
[libcalamares] Tidy up processing of process output
...
- force C locale on processes
- split trailing output if output per-line-processing is active
2021-11-05 16:26:45 +01:00
Adriaan de Groot
2800128a8d
[libcalamares] Expand the output-processing API
...
- support host and target runs
- add stdin and timeout values
- allow automatic output to list
2021-11-03 13:45:15 +01:00
Adriaan de Groot
3120abbce8
[libcalamares] Introduce host_env_process_output, too
...
- run commands consistently, with optional output-processing,
in host or target;
- raises exception on error, like the check_* functions.
2021-11-03 12:23:39 +01:00
Adriaan de Groot
e5323ec487
[libcalamares] Expand Runner documentation
...
- document a bit more of the methods
- provide convenience method enableOutputProcessing() alongside
an explicit setter; adjust tests to the changed API.
- add an executable() information method.
2021-11-03 12:20:36 +01:00