- 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.