- When a Python module calls utils.debug(), there's no point
in logging the C++ funcinfo that passes the parameters on;
don't use cDebug() with its attendant magic.
- Warnings, errors, don't get funcinfo, but regular cDebug()
calls do. Other special-cases, like calling Logger::CDebug()
constructor explicitly, don't get funcinfo either.
FIXES#1328
- Allow logging any QList type (needs explicit call in usage).
- Add a DebugList inheriting from DebugListT to keep existing
code that logs QStringLists.
- For Calamares 3.3, consider using C++17 and class template deduction.
- This bug has been here since f233cac7a1,
where a check for isSet() (of the -D option) was dropped. So since then,
Calamares has always been running with full logging (-D8) on.
- The recently-added "easter egg" of showing the debug-button when
log-level is 8 (to allow debugging-in-production) trips over the
default-log-level of 8, so the debug-button is always visible.
So, minor bugs in the debugging-setup, combine to show a debug-button
when there shouldn't be one.
FIXES#1329
- The manpage for umount says that -R can only be used with
a mount point (e.g. /usr/local) and not a device name;
this makes sense because a device might be mounted in multiple
locations, but the mountpoint (and things mounted under it) lives
in the filesystem tree.
- Existing code tried to unmount -R the device, not the mount point,
and so always failed; leaving things mounted that shouldn't.
Unset GRUB_SAVEDEFAULT if / or /boot is in btrfs or f2fs partition. This avoids the error "sparse file not allowed" at boot time. Btrfs and f2fs do not support saving default entry in grub.
- because mount() returns an exit code, and 0 is "success",
the if (!code) was backwards: when mounting succeeded, the
TemporaryMount object thought it failed.
- This leads to temp-mounts being left *all over* the place
from os-prober and fstab-handling.
- See editorial in the code-comment. Still need to test that
chroot(8) doesn't need a full path, otherwise this will
go to /usr/bin/env udevadm to force lookup (redundantly
if not in a chroot)
- !failed() also means "didn't write the file because it already
exists", which is sometimes acceptable -- but not here.
Use the more-strict bool() conversion, which is only when
the file was actually written.
- Unconditionally **not** overwriting the target file isn't an option:
writing hostname, for instance, expects that to be done even
if `/etc/hostname` already exists on the target filesystem.
- Make tests more resilient: do them in a temp-dir, and clean it
up after successful tests. This was prompted by tests failing
because of things hanging around in /tmp.
- Follow original patch from Gabriel Craciunescu: just drop
the *bufsize* parameter and stick to binary reads.
Text mode was associated in my testing with multiple hangs,
which didn't show up during binary-reads.
- By the time the GS is actually written, new (for partition state)
is always false. So "new" is the wrong thing to track. It should
have had a better name anyway,
- We store custom properties on the partition objects to indicate
what happens to them; use those properties (instead of state,
as done originally), call it "claimed" to indicate that the partition
is part of this installation.
For now, only new (as in, formatted, created-by-us) partitions are
claimed.
- The effect here is that only "new" swap will be added to the system,
so in erase-disk installations, or manual partitioning.
- Install-alongside and replace will now **not** claim the swap already
on the disk; I think we'll need another UI knob for that one.
FIXES#1316
- `createPartitionList()` is called for the summary widget (via
`prettyDescription()`), and from `exec()`. Only the latter
actually *writes* to Global Storage, so it's misleading to
think that the pretty-printed version ends up in GS.
- This makes the "new" key useless, since by the time `exec()` is called
the partitoons are no longer new.
- These tests don't actually test anything in this specific module,
they do test CalamaresUtils::System.
- Wrangling System and JobQueue and GlobalStorage instances is fraught