Commit Graph

139 Commits (e2d6e63fe6506492de269599559439cba1271237)

Author SHA1 Message Date
Adriaan de Groot 43c172f54d [partition] Tighten up types
Don't return the generic Abstract model for bootloader, but
the subclass pointer, so that consumers can use the convenience
API on the subclass.
Adriaan de Groot 1eba562d07 [partition] Apply coding style
shainer c035029f38 Make sure we always set the filesystem label.
In particular, we need a separate Job class to set the label; this
is invoked after we formatted a partition, and when no other changes
to the partition have been requested in the Edit dialog.
shainer b602d423c7 Allow users to set/edit filesystem labels.
When creating or editing a new formatted partition, allow
to set a filesystem label (16 chars maximum). Modify
the KPMHelpers to accept it as a new parameter. Partitions
created by default may get a meaningful label too.
Adriaan de Groot 144b51f00e [partition] Use automount control
FIXES 

(Admittedly, this fixes the problem only when there's Plasma Solid automount
present, and not any of the other kinds; but none of those have been reported
yet, and adding them into AutoMount.cpp is opaque to the rest of the
system)
Adriaan de Groot 2c297a068f [partition] Log when an EFI problem has been solved
Adriaan de Groot 73b5a0898d [partition] Migrate the defaultFS type
- remove the m_defaultFSType from PartitionLayout, because it is
  set on construction -- which is too early, before the configuration
  has been read.
- make the default FS explicit in the init() calls which pass in
  a configuration; this needs support in the intermediate
  PartitionCoreModule.
Gaël PORTAY f03ae06deb [partition] Rename execute to createPartitions
Gaël PORTAY d6ea30b23e [partition] Move initLayout logic to object PartitionLayout
- The logic of the method initLayout belongs to the object
  PartitionLayout. Move logic to that object.
- Use a single method initLayout in object PartitionCoreModule.
- Member m_partLayout in object PartitionCoreModule is no longer
  allocated.
Adriaan de Groot 27f6eaaf75 [partition] Remove unused variables
Adriaan de Groot a955791766 Apply coding style globally again
Adriaan de Groot 88b1d36009 Merge branch 'issues-1166' into calamares
FIXES 
Corentin Noël 08138f5a41 [partition] Reduce direct dependency of PartUtils on PartitionCoreModule
Adriaan de Groot 881661e94b [partition] Migrate InstallChoice to the Config object
Adriaan de Groot 1f77441333 [partition] add job-removal to the support classes
Adriaan de Groot e94c17e331 Merge branch 'calamares' into issues-1166
Adriaan de Groot 1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
Adriaan de Groot 30a85668b7 REUSE: (GPL-3.0-or-later) C++ modules
Adriaan de Groot 23b507ae8e [partition] Chase constness, makeJob()
Adriaan de Groot 20b477d063 [partition] Distinguish jobs with updatePreview()
Adriaan de Groot 6e31d9de4b [partition] Name deviceInfo consistently, auto*
- use auto* for pointer type where we already say "device info" twice
Adriaan de Groot 22ba3cc62d [partition] Make private struct type private
- no need for the definition to be in public header, move to implementation
- while here, sort the members and private methods
- add a makeJob() to add jobs to the queue
Adriaan de Groot c2929e93b3 [partition] Start sanitizing the Jobs on a Device
- having a struct with an obtuse API for adding jobs-that-need-to-happen-
  to-this-device is just not good for maintainability.
- break the build by making things private.
Adriaan de Groot e3b8570d61 Merge remote-tracking branch 'origin/master' into calamares
Pick up some older MRs that apply to the older branch.
Gaël PORTAY c1b5426c66 [partition] Add support for partition attributes
Gaël PORTAY da6f728cd4 [partition] Add support for partition uuid
Adriaan de Groot 8b41a71668 [partition] Apply coding style to core/
Adriaan de Groot b08cb52d0a [partition] Mark /boot or / as bootable
FIXES 
Adriaan de Groot 1718f7a8a8
Merge branch 'master' into partition-type
Gaël PORTAY 15cce29a51 [partition] Add support for filesystem-specific features
Gaël PORTAY c5ebe13aeb [partition] Add support for partition type
Adriaan de Groot 7f295d9565 [partition] Apply coding style to core/ subdir
Because this is a giant code change, with no functional effect,
I've been saving this until the end of the kpmcore-manager branch.
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.
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.
Adriaan de Groot 3930826e93 [fsresizer] [partition] Drop special cases for kpmcore 3.3.1
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
Adriaan de Groot d5f0bdd28c [partition] Simplify negative logic
- Instead of multiple continue statements to avoid negative cases,
   state the one positive case instead.
Adriaan de Groot 8d451622db [partition] Idiomatic use of Calamares::JobList
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?
Adriaan de Groot e0a79f4c0f [partition] Reduce scope for nullptr dereference
- document what types are in use
 - avoid at least one nullptr deref
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.
Adriaan de Groot 3533bb3c2d Merge branch 'master' into issue-1061
Arnaud Ferraris 123222c0a8 Add global checks for partition layout
This commit adds several checks while reading the configuration of the
`partition` module, in case the partition layout configuration is
misformed. If an error is encountered, an message is printed to the
console and the module reverts to the default partition layout.

Checks are also added when implementing the partition layout, in case a
problem occurs that couldn't be anticipated (for example, when a
partition size is in %, checking its absolute value require knowing the
total device size, which is not the case when the configuration is
being read).

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Adriaan de Groot 520478847c Make logging more consistent.
- Across all the C++ modules, use Logger::SubEntry for sub/continues
   log lines, instead of somewhat-random indent strings.
Adriaan de Groot c844188907 [partition] Fix build w/ "3.3.1" API
- Need older-style scanning, but new-style iteration
Adriaan de Groot c0710cabe4 [partition] [fsresizer] Adjust to new #define
- Using KPMCORE4API is clearer than just relying on a version number
Adriaan de Groot 9917bc27fc
Merge pull request from cjlcarvalho/master
[partition] Fixing LVM scanning according to new kpmcore API
Adriaan de Groot 547dc7d334
Merge pull request from a-wai/partition-layout-add-maxsize
[partition] Add max size parameter
Caio Carvalho 2c33535ee8 [partition] Using std::find_if to search in container for elements according to a condition
Caio Carvalho 34e091833d [partition] Fixing LVM scanning according to new kpmcore API