Adriaan de Groot
8e4a2b3543
CMake: Handle KPMCore version better
...
- provide complete information for feature_summary
- set the right API version when building libcalamares
- report the beta version number when it's wrong
2019-06-14 23:57:07 +02:00
Adriaan de Groot
f6373561d3
[partition] One more job that uses KPMCore
2019-06-14 23:39:44 +02:00
Adriaan de Groot
9c85537659
[partition] The VG jobs also use KPMCore
...
- Give them a manager just like other KPMCore-based jobs,
so that the privileged helper can be shut off on time.
2019-06-14 23:32:34 +02:00
Adriaan de Groot
042cef0945
[partition] Make kpmcore includes consistent
2019-06-14 23:20:26 +02:00
Adriaan de Groot
c7da99d870
[partition] More includes fixes, "" instead of <>
2019-06-14 23:14:11 +02:00
Adriaan de Groot
e8408cb5b2
[partition] Fix include path type
...
- Don't use #include <> for files in the current source directory.
2019-06-14 22:59:40 +02:00
Adriaan de Groot
4df9bd8917
[partition] Use KPM manager in partitioning jobs
...
- This gives all the partition-changing jobs an easy way to
manage the lifetime of the privileged helper.
2019-06-14 22:51:35 +02:00
Adriaan de Groot
d0d017f5fe
[libcalamares] Add convenience backend() to KPMManager
2019-06-13 23:39:06 +02:00
Adriaan de Groot
d039f9bbb8
[partition] Remove initKPMCore() from KPMHelpers
...
- This is a job for KPMManager, from the partition service.
- In tests, needs to be a little hackish.
2019-06-13 23:39:06 +02:00
Adriaan de Groot
8eb04a082e
[libcalamares] Move FS-related code to partition service
...
- only moves one function right now, providing user-visible
name for filesystem name.
2019-06-13 14:55:43 +02:00
Adriaan de Groot
4b3bb54320
[libcalamares] Move partition-finding into libcalamares
...
- Moved from KPMHelpers to the partition service
- The is-partition and find-partition methods that make sense
in general, are moved to libcalamares.
2019-06-13 14:41:33 +02:00
Adriaan de Groot
3930826e93
[fsresizer] [partition] Drop special cases for kpmcore 3.3.1
2019-06-13 14:10:49 +02:00
Adriaan de Groot
9f0f08b571
[partition] Replace useless qobject_cast
...
- We know the type of the widget, but were declaring it as
a QWidget. Just forward-declare the class and be done with it.
2019-06-13 14:02:43 +02:00
Adriaan de Groot
4202126f34
[fsresizer] [partition] Fix build with moved headers
...
- PartitionIterator has moved into libcalamares
- While here, sort and organize #include lines
- Add using to keep code impact small
2019-06-13 12:27:39 +02:00
Adriaan de Groot
d8dc512f45
[libcalamares] Move PartitionIterator to partition service.
...
- Starting to centralize utility code for partitioning into
libcalamares instead of scattered and weirdly shared between
modules.
- This particular commit breaks compiling the modules, though.
2019-06-13 12:12:47 +02:00
Adriaan de Groot
f1822c2adb
[partition] [fsresizer] For simplicity, disallow beta KPMcore
2019-06-13 11:45:20 +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