Commit Graph

5177 Commits

Author SHA1 Message Date
corey lang
590f16370c [networkcfg] fix replace_username() undefined variables 2021-09-27 01:24:05 -05:00
demmm
65c1ef7cb5 [initcpiocfg] fix install failure due to extra s 2021-09-24 16:27:35 +02:00
Adriaan de Groot
ce5d42ce0f [networkcfg] Refactor getting source-and-target paths of a file 2021-09-24 12:33:00 +02:00
Adriaan de Groot
13d69cb813 [networkcfg] Don't mindlessly PEP8 2021-09-24 12:30:11 +02:00
Adriaan de Groot
bf60d0576b [networkcfg] Refactor username-replacement
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).
2021-09-24 12:25:33 +02:00
Adriaan de Groot
678e6f6d74 [networkcfg] Be more forgiving when getting the live username
- This function is intended to do whatever it takes to
  get the live username.
2021-09-24 12:15:20 +02:00
Adriaan de Groot
88669a4079
Merge pull request #1777 from librewish/btrfs_additions
[fstab] Improve btrfs mount options
2021-09-24 11:26:41 +02:00
librewish
e5e9e14a9f [initcpiocfg] add consolefont to hooks 2021-09-24 12:30:42 +05:30
librewish
3f890dfb8e [fstab] Improve btrfs mount options 2021-09-24 12:24:58 +05:30
Shrinivas Vishnu Kumbhar
528a815307 [locale] Default to English in India 2021-09-23 11:10:09 +02:00
Shrinivas Vishnu Kumbhar
9b57f402da [keyboard] Use US-English for India 2021-09-23 11:07:43 +02:00
Adriaan de Groot
8f65a644a9 [libcalamares] Rename cPointerSetter
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'>")
2021-09-22 11:29:52 +02:00
Adriaan de Groot
bba5b21873 [libcalamares] Remove cBoolSetter
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.
2021-09-22 11:29:52 +02:00
Adriaan de Groot
cf1128b719 [partition] Cut down log-spam while checking for resize 2021-09-22 01:27:33 +02:00
Adriaan de Groot
857aaa6ca4 [partition] Cut down log spam about /etc/fstab 2021-09-22 01:15:37 +02:00
Adriaan de Groot
cb92e49363 [initcpiocfg] Document this module 2021-09-21 15:16:08 +02:00
Adriaan de Groot
a4c714238f [initcpio] Refactor file-writing
- 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
2021-09-21 13:39:29 +02:00
Adriaan de Groot
12cd9dd5b2 [initcpiocfg] Refactor
- Read the host /etc/mkinitcpio.cfg in one function rather
  than hiding it inside the writer
2021-09-21 13:18:01 +02:00
Adriaan de Groot
60e495bd8c [initcpiocfg] Refactor, improve testability
- 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.
2021-09-21 13:13:21 +02:00
Adriaan de Groot
118e18ac60 [initcpiocfg] Code-shuffle
- 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
2021-09-21 13:03:13 +02:00
Adriaan de Groot
7c3c7c4ff7 [initcpiocfg] Use booleans for boolean values
(as previous) Use False/True rather than ""/"yes" for
keeping track of does-the-system-use-lvm2.
2021-09-21 12:54:18 +02:00
Adriaan de Groot
7f7dc04e8d [initcpiocfg] Use bools for boolean values
Having "" and "yes" as values is a bit shell-script-ish.
Use a regular boolean value instead; simplify code
while we're at it.
2021-09-21 12:52:16 +02:00
Adriaan de Groot
45daebd989 [initcpiocfg] Refactor CPU-characteristics determination
The code is still over-wrought, but the API for cpuinfo
now exposes the interesting thing (is it Intel?) in
a useful -- more readable -- way.
2021-09-21 12:42:58 +02:00
Adriaan de Groot
1d812f88ce [luksbootkeyfile] Bump timeout for adding LUKS keyfile 2021-09-21 12:12:07 +02:00
Adriaan de Groot
a393ffe126 [luksbootkeyfile] Don't dd in the target to get entropy 2021-09-21 11:58:22 +02:00
demmm
9c1e635804 [keyboardq] fix xml files, xml id has to be first 2021-09-17 15:01:27 +02:00
demmm
65b9bb0d6b [keyboardq] set proper SPDX headers
rename wrongly named shift.license
2021-09-16 15:01:37 +02:00
Johannes Kamprad
e98bf0da72
Update shellprocess.conf
a minor typo
2021-09-12 13:47:38 +02:00
Adriaan de Groot
cefe3dd4ff [tracking] Add Q_OBJECT, sanitize API 2021-09-08 13:31:17 +02:00
Adriaan de Groot
8d71e67a75 Add Q_OBJECT macro where it's missing
- Transifex tools complain about missing Q_OBJECT (which makes
  some sense -- you end up with a different context for calls
  to tr(), of the base class).
2021-09-08 13:23:20 +02:00
Adriaan de Groot
3380da638e
Merge pull request #1774 from demmm/calamares
[keyboardq] add interactive keyboard preview
2021-09-08 11:58:36 +02:00
Adriaan de Groot
87eb5300d2 Merge branch 'load-qtbase' into calamares
FIXES #1688
2021-09-08 11:29:15 +02:00
Adriaan de Groot
e47dc4aa78 [partition] Fix build with translated buttons 2021-09-08 11:28:38 +02:00
Adriaan de Groot
4a6753c867 [packagechooser] Restore (renamed) include that is needed after all 2021-09-08 11:26:21 +02:00
Adriaan de Groot
226419f794 [partition] Translate button texts in warning boxes 2021-09-08 11:15:12 +02:00
Adriaan de Groot
7516740bbf [interactiveterminal] Fix up standard buttons 2021-09-08 11:15:12 +02:00
Adriaan de Groot
8c84ae9ff6 [license] Remove unused header 2021-09-08 11:14:46 +02:00
Adriaan de Groot
683bad19fc i18n: introduce a "TranslationFix"
This is intended to apply translations to some common Qt UI components.

Example: a QMessageBox with standard buttons OK and Cancel; the text
for that is determined at startup using the system locale, and later
changes to the current locale or the current translation catalog,
do not affect OK and Cancel. It might be possible to load a catalog
with the right translation strings, except that there is no way to
know what the context or catalog **is** for the strings that are
used to label standard buttons: they can come from Qt base, or
the platform, or the theme. Merely loading the Qt Base translations
for the correct language does not help, because those translations
do not contain an "OK" string with the context used for standard
buttons.

Do the translation by hand; then we have all of the Calamares
languages covered, too, which is more than the Qt translations do.
2021-09-08 11:14:46 +02:00
Adriaan de Groot
06d12fc924 [packagechooser] Remove unneeded include 2021-09-08 11:04:35 +02:00
Adriaan de Groot
4e60f8af13 [libcalamares] Use strong types for locale Ids
Change the API to force strong type for more methods.
This cascades to a couple of consumers.
2021-09-07 12:51:57 +02:00
demmm
79cc616de2 [keyboardq] add interactive keyboard preview
rewrite of keyboardq.qml, reduce stackview to 2, use a combobox for
keyboard models list
colors set to configurable
.xml files used for keyboard layouts, about a dozen added now
builds, runs, actions record as intended, GS filled correctly
2021-09-06 19:25:16 +02:00
Adriaan de Groot
5e7746668e Merge branch 'calamares' into refactor-translation 2021-09-06 15:38:42 +02:00
Adriaan de Groot
0851a8a6a4 Merge branch 'issue-1769' into calamares
FIXES #1769
2021-09-06 13:23:59 +02:00
Adriaan de Groot
44e66c1318 [keyboard] Fix mapping for India + English
- India (when in English) should use the English variant, not Hindi
- While here, fix up minor items in code:
  - Typo in comment
  - Asturian doesn't need a special case (which didn't match, anyway)
  - Don't debug-log a country-name that might be entirely wrong
    (the layout is English, variant "in" but "in" interpreted as
    a country is Indonesia, and the actually-desired name is eng_in
    which isn't a QLocale name at all -- just like the Hausa and Igbo
    special cases)
2021-09-06 13:18:12 +02:00
Adriaan de Groot
b237c73a04 [shellprocess] Fix test
The test was loading the config file (for testing) either from the
build directory or possibly the source directory; if the config
in the build-dir was edited (for other testing purposes) then
the test would fail. Load only the source-dir version of the file.
2021-09-06 12:49:49 +02:00
Adriaan de Groot
6017420dde [welcome] Fix up and expand tests
- improve logging
- fix failing tests -- the observed and expected behavior is
  to fill in a fallback check-URL, not change to an empty list,
- **except** if there's no requirements key in the config
  at all; this is a bit weird, but let's make the tests
  document existing behavior so we can notice if it changes.
2021-09-06 12:35:24 +02:00
Adriaan de Groot
4948f634ed [keyboard] Code tidy
- complain just once (globally) if ckbcomp is not found, rather than
  at every update to the layout.
- tighten up QStringList constructor.
2021-09-06 12:06:11 +02:00
Adriaan de Groot
42bc197f67 Merge branch 'fix-pckq' into calamares 2021-09-06 11:27:09 +02:00
Adriaan de Groot
5a6e033e82 [bootloader] Flags for root-on-BTRFS
This is directly derived from Anke Boersma's KaOS code in module
*bootldr*, which adds the same kernel parameter via a slightly
different route.
2021-09-05 13:34:38 +02:00
Adriaan de Groot
e311d7a893 [packagechooser] Remove 'id' configuration setting
- Setting 'id' (which changes the Global Storage key that
  gets used) is a kludge when the existing module-instance
  name can be used instead -- and **was** already used, as
  a fallback when 'id' is not set. There's no point in having
  two places to set a particular name.
- Rip out the docs for 'id' as well.
- Add documentation on the difference between single-selection
  (the QML implementation) and model-selection (what the Widgets
  version does).
2021-09-03 23:59:11 +02:00