When allocating space for a cell colspan > 1, preferentially
allocate space to columns that have no colspan = 1 cells. If you
have content like this (content padded to 10 and 20 chars to make
calculations easier):
[[(2, "longer content567890"), "shorter890"],
["shorter890", (2, "longer content567890")]]
Taking only colspan = 1 cells into account, the widths of the
columns are (10, 0, 10).
To fit the first longer content in, the current algorithm expands
the first two columns equally, so the widths become (15, 5, 10).
Then to fit the second longer content in, the second two columns
are widened equally (or nearly so), resulting in final widths
of (15, 8, 12) and a table layout like this:
+-------------------------+--------------+
| longer content567890 | shorter890 |
+-----------------+-------+--------------+
| shorter890 | longer content567890 |
+-----------------+----------------------+
which is bizarrely asymmetrical given the input and wider than it
needs to be.
If instead we preferentially widen columns that have no width
from colspan = 1 columns, we get this layout:
+----------------------+------------+
| longer content567890 | shorter890 |
+------------+---------+------------+
| shorter890 | longer content567890 |
+------------+----------------------+
Which is much more in line with my expectations.
This means you can use an answers file that leaves you on the filesystem
screen, click "back" to choose a different option and not have
everything fall over in a heap.
The guided "use a whole disk" flow in reusing existing partitions is
going to need to be able to generically destroy the existing users of
a disk, something that subiquity does not currently let you do (you
can't delete a RAID if is part of another RAID, for example). So add
generic ways of clearing and deleting objects.
curtin allows parition/lv sizes to be specified as strings or integers.
To avoid depending on whichever extract_storage_config gives us back,
canonicalize them to integers when creating an action. Similarly, curtin
accepts as synonyms "dos" and "msdos" for ptable; here we canonicalize
them both to "msdos".
This required marking some "behind the scenes" attributes as init=False
(which makes some logical sense) and reordering some other attributes
(including "id" and "type", which are now added generically) to move
optional ones after mandatory ones. Neither of these would be necessary
with a newer version of attrs (where we could use kw_only=True on the
class) but well, not too bad.
Leave Disk mostly alone for now because how they get created is going to
change completely with reusing partitions.