Adriaan de Groot
8639c9a79f
[partition] Fix up tests
2021-11-09 16:37:25 +01:00
Adriaan de Groot
cd0785164b
[partition] Fix compatibility with Qt 5.12
2021-11-09 15:57:20 +01:00
Adriaan de Groot
575654941f
[partition] Move required partition table type to Config
...
- remove from GS
- remove duplication across Config and ChoicePage
- improve translations (presumably "msdos or gpt" is the most
complicated it will get)
FIXES #1735
2021-11-09 12:25:47 +01:00
Philip Müller
0486e48c4e
[partition] offer /boot also when other EFI partition was specified
...
- it still makes sense to offer /boot in EFI
- example: /boot ext4, /boot/efi vfat
- this partly reverts 60f8a7c5fb
2021-11-09 01:51:49 +01:00
Adriaan de Groot
e8209089c6
Merge branch 'issue-1740' into calamares
...
FIXES #1740
2021-11-03 15:49:03 +01:00
Adriaan de Groot
a0cb4b63a8
[partition] Fix build for old Qt
2021-11-03 11:14:22 +01:00
Adriaan de Groot
344948b5ab
Modules: clean up QProcess (part 1)
2021-11-02 23:46:26 +01:00
Adriaan de Groot
b5dba9108c
[partition] Check for LVs that will be formatted, don't close them
...
- when (manually) using an existing LV, it shouldn't be closed
prior to formatting, since that kills the volume and then the
path (/dev/myvg/mylv) no longer exists. Then creating the
filesysytem on that device path fails.
2021-11-02 15:33:34 +01:00
Adriaan de Groot
7b45793b60
[partition] Allow exceptions when closing /dev/mapper
...
- some names should not be closed, like "control"
- allow a list of names to be added which should not be closed
2021-11-02 15:26:25 +01:00
Adriaan de Groot
1410157356
[partition] Simplify and document ClearMounts
...
- note that the job indiscriminately closes all LUKS and LV
- don't hang on to lists we don't need
2021-11-02 11:55:13 +01:00
Adriaan de Groot
0253977778
[partition] Coding style
2021-11-02 11:50:51 +01:00
Adriaan de Groot
ca4a187d1a
[partition] Extract the get-PV-groups code to its own function
...
- get the list (once)
- move the lambda to a named function for readability
2021-11-02 11:18:14 +01:00
Adriaan de Groot
7fa02fd41c
[partition] Extract the get-LVM-volumes code to its own function
2021-11-02 11:10:09 +01:00
Adriaan de Groot
2a1ec84c87
[partition] Don't hang on to pointer longer than needed
2021-11-02 11:03:10 +01:00
Adriaan de Groot
04b119b051
[partition] Crypto device-list needn't be a member, either
2021-11-02 00:25:37 +01:00
Adriaan de Groot
f49389a408
[partition] Fix logic errors in stringification of MessageAndPath
2021-11-02 00:09:52 +01:00
Adriaan de Groot
c322eaa430
[partition] Fix translation issues
...
- Strings were being used as logical values, and then logged
(which should be in English) and also used in the UI (which
should be localized). Replace with a MessageAndPath class,
used only locally, that defers the translation until called-
upon explicitly.
- Replace some VG stuff with similar calls to apply().
2021-11-01 23:59:39 +01:00
Adriaan de Groot
e56158f5b4
[partition] Generate partition paths with /dev/
...
Returning partition full-paths instead of only the block-device-name
simplifies later code -- which would prepend /dev/ to the block-
device-name and umount that.
2021-11-01 20:54:48 +01:00
Adriaan de Groot
6c2b2b0daa
[partition] Factor out loops, document return values
...
- the tryX() functions weirdly return a string that is used for
debug-logging. Document that. The untranslated string is
later used for user-facing messages. Mark that as FIXME.
- factor out the loop-over-names-and-append to news, because that
makes the overall story of what is happening hard to read.
- all calls to tryCryptoClose() called tryUnmount() first, so
put that call inside tryCryptoClose(), so the interface is simpler.
2021-11-01 20:54:18 +01:00
Adriaan de Groot
0c84a87c67
[partition] Make internal methods static
2021-11-01 20:28:47 +01:00
Adriaan de Groot
105517fed7
[partition] Coding style
2021-11-01 20:24:47 +01:00
Adriaan de Groot
ac34cfadea
[partition] Factor out finding the swap-partitions
2021-11-01 20:23:49 +01:00
Adriaan de Groot
3e58639a68
[partition] Improve logging in ClearMountsJob
...
- mark internal bits as static
- explain what is being looked-for
SEE #1817
SEE #1564
2021-11-01 16:44:28 +01:00
dalto
13a2d25b24
Add separate functions for zfs
2021-10-29 16:54:09 -05:00
dalto
be47b5e59c
Fix for zfs partition deletion
2021-10-23 13:40:47 -05:00
Adriaan de Groot
d556dae415
[partition] Document how the configurable EFI size is coordinated
2021-09-28 21:31:12 +02:00
Adriaan de Groot
05f287ebbb
[partition] Use the configured EFI size
...
The `partition.conf` file contains an EFI-size. The default is 300MiB,
but distributions might like to use a bigger (or smaller) value.
Apply the configuration consistently everywhere where we need
"the size of the EFI partition". Extend the internal method
to look at the configured size.
2021-09-28 18:23:19 +02:00
Adriaan de Groot
90eb0cd844
[partition] Fix build
2021-09-28 18:16:34 +02:00
Adriaan de Groot
a72fc06502
[partition] Fix message (use MiB instead of bytes)
...
Reported by cfinnberg.
FIXES : #1796
2021-09-28 16:55:35 +02:00
Adriaan de Groot
6b460ce440
[partition] Compare size with the canonical source of "right EFI size"
...
While here, note that the canonical source returns bytes (not MiB).
2021-09-28 16:55:35 +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
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
e47dc4aa78
[partition] Fix build with translated buttons
2021-09-08 11:28:38 +02:00
Adriaan de Groot
226419f794
[partition] Translate button texts in warning boxes
2021-09-08 11:15:12 +02:00
Adriaan de Groot
2f88ba0d3f
[partition] Coding style
2021-08-31 14:03:04 +02:00
Adriaan de Groot
09491e4cbb
[partition] expect failures when kpm can't read the disk
2021-08-31 13:58:23 +02:00
Adriaan de Groot
1554c3a07c
[partition] Create KPM backend at start of test
2021-08-31 13:54:23 +02:00
Adriaan de Groot
3d0709c779
[partition] Avoid crash when there is no KPM backend
2021-08-31 13:46:25 +02:00
Adriaan de Groot
ede19c8a61
[partition] Fix build of devices test
2021-08-31 13:45:15 +02:00
Adriaan de Groot
854eb845d2
[partition] Fix build of layoutstest
...
This test needs UI because the devicemodel uses GUI parts.
2021-08-05 15:49:29 +02:00
Adriaan de Groot
22ba21f937
[partition] Stub of a test of scandevice
2021-08-31 13:16:45 +02:00
Adriaan de Groot
e294221a2d
[partition] Rename test executables
...
- all partition tests are now named partition<thing>test
2021-08-31 13:08:54 +02:00
Adriaan de Groot
d7767afe1b
Merge branch 'extra_qml' into calamares
2021-08-30 23:17:36 +02:00
Adriaan de Groot
6f16d3db83
Merge remote-tracking branch 'origin/issue-1761' into calamares
...
FIXES #1761
2021-08-30 22:33:03 +02:00
waneon
4bf3afac48
[partition] Fix invalid variable name
2021-08-27 19:18:09 -04:00
Adriaan de Groot
da49becac3
[partition] Tailor warning message about ESP
...
- tell the user all the things that are wrong with the
(proposed) ESP; a missing one gets all the suggestions.
2021-08-27 17:28:07 +02:00
Adriaan de Groot
6324fa3eb9
[partition] Disentangle questions of suitability of ESP
...
- split into size, type, flags so the warning message can
be tailored to what is wrong.
2021-08-27 17:27:26 +02:00
Adriaan de Groot
7d08770806
[partition] Apply code style
2021-08-27 17:26:50 +02:00
Adriaan de Groot
52a82ea1e6
[partition] Improve warning message in log
2021-08-26 17:39:06 +02:00