Adriaan de Groot
0aabc89449
[partition] [welcome] Simplify retranslation
2019-08-29 15:02:12 +02:00
Adriaan de Groot
a6db224fcb
[fsresizer] [partition] Gracefully fail on missing dependencies
...
- If KPMcore is found -- it requires some other KDE Frameworks but
at least in pre-4.0 versions doesn't check very well for them --
then missing its dependencies is no cause for CMake failure.
Instead, log it nicely and suppress the module.
2019-08-12 13:23:34 +02:00
Adriaan de Groot
48a25858f0
[partition] Chase 3rdparty move
2019-08-08 12:42:47 -04:00
Adriaan de Groot
5876c3fdd7
[partition] Warn about storage setting in partition.conf
...
- This is really a specialised setting, not something for
general use. People should be using `welcome.conf` instead.
2019-06-21 13:43:02 +02:00
Adriaan de Groot
74432f698f
[partition] Allow the requiredStorage setting to propagate
...
- store into globalStorage if the welcome module hasn't already done so.
- this ends up used in PartUtils (via globalStorage).
2019-06-08 14:36:11 +02:00
Adriaan de Groot
e6a2cb607f
[partition] Add setting for requiredstorage
...
- If the welcome module isn't used, can set a required amount
of storage for the installation here.
2019-06-08 07:48:47 -04:00
Adriaan de Groot
b5c50c8d04
[partition] Update canBeReplaced
...
- Use GiB consistently
- Provide same kind of debugging information as canBeResized()
2019-06-07 23:19:24 +02:00
Adriaan de Groot
79934aa513
[partition] Use GiB consistently in code
2019-06-07 23:04:24 +02:00
Adriaan de Groot
acf3dbcdcb
[partition] Refactor getting the globalStorage value
2019-06-07 22:55:50 +02:00
Adriaan de Groot
3548792d1b
[partition] Improve check canBeResized
...
- Report the globalSettings name properly (with "GiB")
- Bail out on bad conversion early.
2019-06-07 22:51:33 +02:00
Adriaan de Groot
a263381996
[partition] Avoid an assert when running Calamares as user.
2019-05-31 12:27:32 +02:00
Adriaan de Groot
4a6b9f3528
[partition] Call update from init() in BootLoaderModel
...
- update() (might) add some extra rows for boot and root,
which otherwise vanish temporarily when calling init.
2019-05-31 12:11:48 +02:00
Adriaan de Groot
d5f0bdd28c
[partition] Simplify negative logic
...
- Instead of multiple continue statements to avoid negative cases,
state the one positive case instead.
2019-05-31 12:08:58 +02:00
Adriaan de Groot
3bdbfe6bff
[partition] Avoid crash if combobox is gone and model resets
...
- Since the lambda is connected to the model only, it should
check that the target combo exists as well.
2019-05-31 12:08:58 +02:00
Adriaan de Groot
2ce2b08027
[partition] Indent lambdas to tab-stop.
...
- Lambdas are all over the place in this codebase, formulate
a standard and start adjusting code to it in passing.
2019-05-31 12:08:58 +02:00
Adriaan de Groot
353e713f81
[partition] Complain loudly on dangling Partition pointers
...
- Don't crash if a bad pointer gets into colorutils.
2019-05-31 12:08:58 +02:00
Adriaan de Groot
2bc95d11d3
[partition] Unrelated typo in comment
2019-05-31 12:08:58 +02:00
Adriaan de Groot
f1f5b6c1bb
[partition] Restore BootLoader path in Choice Page
...
- after model resets, restore what was previously selected.
- This avoids having an **empty** combobox, SEE #1141 but does
not actually set it back to the value the user had previously
picked (e.g. changing swap settings **still** breaks the
selection).
2019-05-31 12:08:58 +02:00
Adriaan de Groot
0ebabfafd4
[partition] Move BootLoaderModel convenience functions
...
- These were hidden inside PartitionPage, but are useful elsewhere.
2019-05-31 12:08:58 +02:00
Adriaan de Groot
8d451622db
[partition] Idiomatic use of Calamares::JobList
2019-05-28 16:39:00 +02:00
Adriaan de Groot
e2b71e669e
[partition] When running UNSAFE, no-install-partition is a warning
2019-05-28 16:29:45 +02:00
Adriaan de Groot
34ffc7a20a
[libcalamares] Consistent namespace usage in partition service
...
- The sub-directories under libcalamares (e.g. Utils, ..)
all live in namespace CalamaresUtils (well, except for Logger).
The services (e.g. subdirs other than utils/) live in their
own nested namespace, so partitioning should go into
CalamaresUtils::Partition for consistency.
2019-05-14 05:52:58 -04:00
Adriaan de Groot
80606cc38d
[partition] Reduce test warnings through consistent signedness
2019-05-14 05:29:19 -04:00
Adriaan de Groot
7e12b65c94
[partition] Silence warnings about missing vtable
2019-05-14 05:29:19 -04:00
Adriaan de Groot
81715ba199
[partition] Warnings-- by using nullptr instead of 0
2019-05-14 05:29:19 -04:00
Adriaan de Groot
54108d2bab
[partition] Fix up logging of jobs
...
- Logging `*it` was printing raw pointers, logging (plain) `it`
needs the specialized logging `operator<<` to DTRT with temporaries.
2019-05-14 05:29:19 -04:00
Adriaan de Groot
fd4bc4bb17
[partition] Avoid UB by initializing size everywhere
2019-05-14 05:29:18 -04:00
Adriaan de Groot
bffaf47900
[partition] Reduce warnings about integer size
2019-05-14 05:29:18 -04:00
Adriaan de Groot
3b0d778d1e
[partition] Mention that reuse-swap isn't supported now
2019-05-12 16:34:57 +02:00
Adriaan de Groot
bbd2afc20f
Merge branch 'issue-1129'
...
FIXES #1129
2019-05-09 08:14:25 -04:00
Adriaan de Groot
53230d73e2
[partition] Replace user-visible MB with MiB
2019-05-09 08:13:58 -04:00
Adriaan de Groot
b08de96315
[partition] Comment w/ MiB instead of MB
2019-05-09 08:00:23 -04:00
Adriaan de Groot
707ec98553
[partition] Tidy labels view
...
- Use MiB terminology and support code
- Remove debugging chattiness
- Fix up include style
2019-05-09 07:58:20 -04:00
Adriaan de Groot
50857dcfec
[partition] Fix tests to use "MiB" terminology
2019-05-09 07:51:35 -04:00
Arnaud Ferraris
eb57be1be8
[partition] Remove deprecated sizeToSectors() function
...
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 19:31:41 +02:00
Arnaud Ferraris
80fd3d3353
[partition] Switch to using the generic PartitionSize class
...
Instead of relying on a module-specific implementation, use the new
PartitionSize class for storing partition sizes.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 19:31:20 +02:00
Arnaud Ferraris
36bc0e6308
[partition] Move bytesToSectors() to CalamaresUtils namespace
...
In order to prepare for future refactoring of the PartSize class, move
the bytesToSectors() function to libcalamares in the CalamaresUtils
namespace.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 19:20:38 +02:00
Adriaan de Groot
9331a25905
[libcalamares] Remove Typedefs.h
...
- This small header file contained a few unrelated typedefs.
Move those typedefs to the classes they relate to. This
**does** mean that some consumers need to #include something
else instead.
- Use type names more consistently.
Editorial: why are **pages** responsible for creating the jobs?
2019-05-07 09:51:23 -04:00
Adriaan de Groot
d3783ef293
[partition] Use GiB and MiB consistently
2019-05-06 16:47:11 +02:00
Adriaan de Groot
502d43d111
[welcome] [partition] Rename GlobalStorage variable used for storage
...
- Change name passed into GS to use "GiB" instead of "GB", for
consistency. This needs to be done in consumers as well.
2019-05-06 16:39:14 +02:00
Kevin Kofler
a01d4707e1
[partition] Do not unmount /dev/mapper/live-* in ClearMountsJob
...
src/modules/partition/jobs/ClearMountsJob.cpp
(ClearMountsJob::getCryptoDevices): Skip not only `/dev/mapper/control`,
but also `/dev/mapper/live-*`. Fedora live images use
`/dev/mapper/live-*` internally. We must not unmount those devices,
because they are used by the live image and because we need
`/dev/mapper/live-base` in the `unpackfs` module.
2019-05-06 15:08:10 +02:00
Adriaan de Groot
e0a79f4c0f
[partition] Reduce scope for nullptr dereference
...
- document what types are in use
- avoid at least one nullptr deref
2019-05-03 08:47:34 -04:00
Adriaan de Groot
a01262a535
CMake: massage dependency-finding
...
- If KPMCore is not found, don't require the KF5 components
that it would depend on.
- If ECM is found, use KDEInstallDirs always, not just when
the partitioning module is used.
2019-04-30 13:38:46 +02:00
Adriaan de Groot
090aee9196
Modules: adjust to split-out utils/Variant.h
...
- Most modules only needed the variant support, not the "whole"
CalamaresUtils header.
- While here improve ordering of headers as well.
2019-04-29 06:14:21 -04:00
Adriaan de Groot
ca3110d429
[partition] Drop extra ; (warnings--)
2019-04-25 10:17:07 -04:00
Adriaan de Groot
e8264a4503
[partition] Prefer GPT on EFI systems for new partition table
2019-04-25 14:40:27 +02:00
Adriaan de Groot
516b3b4b6c
[partition] Adjust to logging-API changes
...
- missed due to #ifdef on a KPMcore API version I don't have on
my main workstation.
2019-04-25 13:42:59 +02:00
Adriaan de Groot
3533bb3c2d
Merge branch 'master' into issue-1061
2019-04-24 12:26:01 -04:00
Adriaan de Groot
08e4090354
Merge remote-tracking branch 'origin/raurodse-branding'
...
FIXES #961
2019-04-23 16:41:22 -04:00
Adriaan de Groot
c99742bc70
Merge pull request #1127 from a-wai/partition-layout-size-checks
...
Add various checks for partition layout configuration
2019-04-18 13:48:50 +02:00