Adriaan de Groot
587a18a6fa
[partition] Use runCommand() for future-proofing
2021-12-14 12:50:27 +01:00
Adriaan de Groot
f04394d014
[partition] Improve rendering of KPMCore errors
2021-12-13 20:02:52 +01:00
Adriaan de Groot
07354a26a9
[partition] Simplify debug calls to executables
...
- Use the Calamares support-functions for running lsblk and mount
(these might need to have privilege support if Cala is not
running as root, so this is future-proofing)
2021-12-13 20:02:52 +01:00
Adriaan de Groot
fdf0f208f0
[partition] Use lvalue-overload of execute() convenience
...
- These jobs may take a long time, and report progress; we need
the operation around to be able to connect the signals and slots
2021-12-13 20:02:52 +01:00
Adriaan de Groot
6680584724
[partition] Use convenience function execute()
...
This job needs the lvalue-overload of execute() because it needs to
call a method on the operation after execute() finishes successfully.
2021-12-13 20:02:52 +01:00
Adriaan de Groot
c5573a1997
[partition] Add non-const lvalue overload for execute()
2021-12-13 20:02:52 +01:00
Adriaan de Groot
b8ce21d572
[partition] Use convenience function for running operations
2021-12-13 20:02:52 +01:00
Adriaan de Groot
1356012fb4
[partition] With rvalue, code becomes even more compact
2021-12-13 20:02:52 +01:00
Adriaan de Groot
8bb2c5fc6b
[partition] Use convenience-method for running operation
2021-12-13 20:02:52 +01:00
Adriaan de Groot
dc7a1e43b7
[partition] Add helper for running a KPMCore operation
...
Most *partition* module jobs run an operation and turn that into
a JobResult -- ok if it succeeds, and with the report text otherwise.
Factor it out into a separate method that can be used as shorthand.
2021-12-13 20:02:52 +01:00
Adriaan de Groot
03da766b39
[partition] Keep 64-bit integers for swap sizes
...
FIXES #1849
2021-12-11 13:19:08 +01:00
Adriaan de Groot
1d96c5af46
[partition] Table type 'none' is a late addition.
2021-12-05 01:32:51 +01:00
Adriaan de Groot
f0eb7ffbda
[partition Untangle, Warnings--
...
The translations apply to labels and a tooltip, which depends on
the partition-table type. Move the strings together and make
the whole range of the switch explicitly.
2021-12-08 00:59:20 +01:00
Adriaan de Groot
e8ca298712
[partition] Reduce warnings
2021-12-08 00:15:01 +01:00
Adriaan de Groot
13700b18c8
[partition] Warnings--
...
- remove superfluous `break`
- massage types around partition sizes
2021-12-08 00:06:17 +01:00
Adriaan de Groot
09f47b5762
[partition] Build tests with consistent flags (in particular, KPMCore4-API flags)
2021-12-07 15:51:45 +01:00
Adriaan de Groot
6e715205d7
[partition] Warnings-- by calling formatting consistently
2021-12-07 15:36:11 +01:00
Adriaan de Groot
09a03fbbc0
[partition] Warnings--: we don't care about one-byte-in-10^12
2021-12-07 15:31:49 +01:00
Adriaan de Groot
bb3f4442f5
[partition] Warnings-reduction
...
- use consistent size-formatting
- needs an out-of-line virtual function
2021-12-07 15:30:21 +01:00
Adriaan de Groot
5b05110351
[partition] Add convenience function formatByteSize
...
We want to use the KPMCore function consistently, but Calamares
uses a qint64 most of the time. Centralize the cast to double
in one place in the code.
2021-12-07 15:29:02 +01:00
Adriaan de Groot
149f3ff3fe
[partition] Reduce warnings about shadowed variables
2021-12-06 14:52:33 +01:00
Adriaan de Groot
d89553a777
[partition] Avoid problems with MessageAndPath in containers (drop const)
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
dalto
f5b882a075
[partition] Remove setState call to resolve compat issue with older kpmcore
2021-11-18 13:36:23 -06:00
Adriaan de Groot
ece1e338e0
Merge pull request #1822 from dalto8/zfs-wip
...
[zfs] Support for installing to root-on-ZFS
2021-11-17 12:20:34 +01:00
Adriaan de Groot
efe84bc6c0
[partition] Don't log private names
...
- log device node (/dev/sdb) instead of its name
- don't log job's prettyName() because that's translated, and also
contains user-visible private names (introducing a non-translated,
nicely redacted version of prettyName() seems like too much effort
for something that can be reconstructed from bits earlier in the log)
2021-11-16 15:31:35 +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
7cc84b89be
[partition] Clarify the meaning of the various UUIDs in debug-output
2021-11-16 14:15:00 +01:00
Adriaan de Groot
4db4e983e3
[partition] Don't format tables of attributes in source
2021-11-16 14:04:00 +01:00
Adriaan de Groot
3aac4dea67
[partition] Remove logging-of-a-pointer during device detection
2021-11-16 13:52:10 +01:00
dalto
490ac8d086
[partition] Ensure format is selected for existing zfs partitions
2021-11-15 18:41:35 -06:00
dalto
c48c91a5bd
[partition] Add support for zfs encryption when erase disk is selected
2021-11-15 18:41:35 -06:00
dalto
ee99ee48f6
Add support for multiple zpools
2021-11-15 18:41:35 -06:00
dalto
6da9bad272
[partition][zfs] Add support for zfs encryption
2021-11-15 18:41:34 -06:00
dalto
24a376493b
[partition] Add support for manually creating a partition for zfs
2021-11-15 18:41:34 -06:00
dalto
ca3f0e2892
[partition] Add zfs to the filesystem list if the zfs modules is enabled
2021-11-15 18:41:34 -06:00
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
bd4bed1438
Merge branch 'calamares' into work-3.3
2021-11-09 15:31:37 +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
Adriaan de Groot
dde55471ba
Merge branch 'calamares' into work-3.3
2021-10-30 15:00:54 +02: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
605ad788d0
[partition] Fix build against Qt deprecations
...
setMargin() has been deprecated for a long time, and
Calamares has a utility function for it anyway.
2021-09-30 00:02:43 +02:00
Adriaan de Groot
bcde8b87b1
[partition] Remove unreachable break
statements
2021-09-29 23:55:40 +02: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
Adriaan de Groot
46ca4d93e7
[partition] Improve constness, naming
2021-08-26 17:30:55 +02:00
Adriaan de Groot
ad9306d7bb
Merge pull request #1749 from LordTermor/calamares
...
[partition] Disable delete button for extended partition
2021-08-26 17:18:09 +02:00
Artem Grinev
74a3a2da78
[partition] Fix Delete button for extended
...
Extended partition can't be removed when contains children. This commit
adds missing check.
2021-08-12 02:13:16 +04:00
Adriaan de Groot
b7a3f58df4
[partition] Update waiting widget only if it (still) exists
2021-08-05 14:51:31 +02:00
Adriaan de Groot
a1690ac2d6
[partition] Set up swap-choice texts correctly
2021-08-04 01:47:55 +02:00
Adriaan de Groot
0be4c38a87
[partition] Remove useless parameter
...
- previously, updateSwapChoicesTr() wanted to be a static free function,
but it needs QObject::tr() ; drop the unnecessary parameter (since it
is a member function).
2021-08-04 01:45:22 +02:00
Adriaan de Groot
390acd41b2
[partition] Factor out manual partitioning translation
...
- needs to be called when the button is created, too
2021-08-04 01:42:00 +02:00
Adriaan de Groot
2820316d16
Partition: don't set text if button doesn't exist
2021-08-05 14:23:11 +02:00
Adriaan de Groot
e8cb5c621a
[partition] Fix build
2021-07-26 20:54:43 +02:00
Adriaan de Groot
616f3d4fd7
[partition] Simplify retranslation of swap choices and manual partitioning
2021-07-26 16:18:31 +02:00