This change fixes a few issues and adds a few improvements to the LightDM Autologin configuration process:
Fixes:
- Fixes malforming of configuration file out of the box, as without `[SeatDefaults]`, `[Seat:*]` or similar in the configuration file LightDM will break on a lot of distributions using LightDM
- Preserves the intended lightdm.conf file settings outside of `autologin-user` if the distribution has an /etc/lightdm/lightdm.conf file of its own
Misc. changes:
- Small spelling fix
- Instead of Continuation(), write just Continuation
- All that futzing with overloads and tag-classes isn't needed
since the whole point is to output some constant string. Leave
cleverness for later, if it's needed.
- KDE neon ships a post-3.3.0 KPMCore, with deprecations, but not yet
the KPMCore 4 API, so add another API-version check to handle the
deprecations. Keeps warnings down.
- Switch debug-level to unsigned
- Don't shadow usings; the first TR type is enough
- The (bogus) return values were commented as // NOTREACHED,
but still yield unreachable code warnings. Drop them
instead, and rely on the compiler understanding [[noreturn]]
on parser.usage().
- Don't use this if we don't need it (QObject::tr is static).
- C++14 allows (copy) binding to arbitrary expresstions in lambda's,
so detach from this.
When using a custom partition layout with partition sizes in %, it can
be useful to set an upper limit to the partition size.
For instance, using a 20% size for the `/` partition will create a 24G
partition on a 120GB drive, but a 200GB partition on a 1TB drive, which
is not useful, and could be avoided by setting a maximum partition size.
This commit adds the `maxSize` parameter (with a default value of 100%).
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- Using project() to set up the version is idiomatic for CMake
and more standardised than doing it by hand. Do retain the
RC flag, because that's used in other parts of versioning.
- When environment is empty, use default values from spec
- Search in application-named subdirs first (but keep previous
behavior of also searching directly in the named dirs)
- Don't consider empty XDG_* elements
- Settings XDG_DATA_DIRS=":" would yield an empty list of extra
directories to check; don't bother setting haveExtraDirs for that.
- When the manual partitioning page exists, it reacts to
changes in a bunch of models; these models can be changed
repeatedly from the choice page.
- the manual partitioning page really only needs to deal with
the relevant selections at the moment it is instantiated.
- This initial bit of code re-uses the *dont-chroot* setting;
it may need to be made independent.
- This branch will use `isSetupMode()` to adjust user-visible
strings to match the intended use.
SEE #1100
- rsync reports its own progress, and reports on files that
find -type f doesn't. This meant that the numbers didn't
match what was stored in entry.total
- The ir-phase adds files to be handled; to-phase happens once
ir-phase is over and the remaining files are processed.
By adding the to-phase files, percentages over 100% were
reported (in part because the number of files doesn't match).
- Update expected entries total from rsync output.
- Re-jig computation of how done everything is: tally it
up in integers, and do only one global progress percentage.
- The mismatch between "ir-chk" and the comment "to-check" led me
to check (ha!) the output of rsync, and it outputs "to-chk"
during small transfers; make sure the comment reflects what
is actually being used to track progress (which is "ir-chk").
- After the BootLoader model is reset, if a bootloader location
has been selected before, try to find it in the (now-reset)
model to preserve the selection.
- clear() signals modelReset(), which is true, but inconvenient
when we do a bunch of changes afterwards. Block signals,
and rely on own signaling when all of the changes are done.
- Keep blocking signals while updating the model, since the row
appends otherwise trigger a change in the connected combo box.
- For unsafe installations (compile-time option), make sure
things fail before partitions are actually written, unless
the other option is also turned off.
- This is a compile-time choice, and off by default. This may be useful
for developers that need to get through installation to a different
partition on their root drive.
- Add an option to avoid actually doing unsafe things. This is an extra
safeguard; you need to turn on one and turn off the other option to
really be unsafe.
- Avoid crash due to invalid iterator, when modules
are removed due to missing requirements.
- Simplify code, factor out the determination of
which required modules are missing.
- Load instances list in a separate method
- Load sequence list in a separate method
- Don't rely on QASSERT, explicitly throw if something is missing.
- This was commented out to combat the crash in device->type()
- I believe the crash was caused by double-deletion, which was
fixed in 2092ec3c9a by not re-
parenting an immutable copy of something.
- Restore the button-fix, since we need that to keep the
*create* button in-sync with the selected partition.
FIXES#1097
As requested, this commit adds a new configuration option to the
partition.conf file, name `efiSystemPartitionSize`.
When this option is absent, the default size of 300MiB will be used.
Fixes#1090
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
In order to allow the use of these functions across the whole partition
module and keep all partition size-related functions in the same
namespace, this commit moves them to PartUtils.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit creates a _KiB operator for future use by the partition
module.
It also fixes a typo in one instance of MiBtoBytes(), requiring a couple
extra fixes.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
In order to be able to parse partition size strings using the same
functions across the partition module, the parseSizeString() function is
exported to the PartUtils namespace.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- Make some methods that are called mostly as slots, actual slots,
instead of going through extra lambdas.
- Use QOverload<>::of for disambiguation instead of homebrew casts.
- Provide a convenience method that names a Partition* with the
best human-readable name we can find (worst-case, spit out a
pointer representation which will at least help figure out
the identity of the Partition*).
- These methods are used for multi-page view-steps, which are rare.
For all the others, just drop the empty implementation and defer
to the base class.
- Next was enabled early; presumably to cover the case that no requirements
were checked and the requirements checker never emitted an update signal.
Drop that since the module manager is now responsible for doing that checking.