Michael Hudson-Doyle
f188a4a4b0
clear disk.preserve when needed
...
also never set disk.wipe: setting preserve=False/ptable=gpt is
equivalent anyay.
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
c99227a310
support for reusing an existing swap partition
...
the showing and hiding of fields is fairly horrible, but not *too*
horrible.
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
aef842a11f
allow the user to choose whether to reformat the ESP
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
83574fbc0b
mark formatted existing partions as ok_for_{raid,lvm_vg}
...
as we do not support removing an exisiting format, this is required to
be able to reuse these partitions!
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
e63204afa9
mounting a partition of a disk that can be the boot disk makes it the boot disk
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
52ee6cdde1
use reformat instead of reset in guided disk selection
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
97952ef9be
adapt make_boot_disk for existing boot partitions
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
2f844d09d3
the REFORMAT action
2019-05-30 15:33:59 +12:00
Michael Hudson-Doyle
4c3a46669b
fix up enabling of actions in face of preexisting things
2019-05-30 15:33:55 +12:00
Michael Hudson-Doyle
4b45d02f73
adjust usage labels
2019-05-30 15:10:54 +12:00
Michael Hudson-Doyle
f3ffd9b8e9
add new/existing annotations
2019-05-30 15:10:54 +12:00
Michael Hudson-Doyle
628758811e
support for editing existing partitions
2019-05-30 15:10:54 +12:00
Michael Hudson-Doyle
620d7b1973
call extract_storage_config with probert config to create actions
2019-05-30 15:10:54 +12:00
Michael Hudson-Doyle
e6ace190e3
add existing partitions sample data
2019-05-30 15:10:54 +12:00
Michael Hudson-Doyle
35b16acee1
display information about partitions in delete confirmation
...
For a while subiquity only allowed you to delete RAIDs/VGs with no
partitions. Now that we do, include information about the doomed
partitions in the confirmation dialog.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
97d5248aef
summarize disk usage in the guided disk selection view
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
4db967766b
factor some of device summarization out into a separate function
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
d48e33ae36
Display all info about a partition on a single line in filesystem view
...
And add a space between each device.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
3bdca52ed4
Tweak the adjustment of table columns widths for cells with colspan > 1
...
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.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
3bad9e408a
move "usage labels" from filesystem view to model objects
...
So the logic can be reused.
2019-05-30 15:10:34 +12:00
Michael Hudson-Doyle
f45880944e
create partitions for testing directly
...
FilesystemModel.add_partition does a bit too much stuff
2019-05-30 15:09:40 +12:00
Michael Hudson-Doyle
c659c08d2e
fix TestFilesystemModel.assertActionPossible
2019-05-30 14:52:06 +12:00
Michael Hudson-Doyle
aad19ecf22
Merge pull request #499 from mwhudson/ok_for_xxx-tests
...
add tests for ok_for_raid/ok_for_lvm_vg
2019-05-30 11:23:50 +12:00
Michael Hudson-Doyle
ef12e1343e
add tests for ok_for_raid/ok_for_lvm_vg
...
also make the various implementations more consistent.
2019-05-30 11:18:00 +12:00
Michael Hudson-Doyle
a4d44ba7a8
Merge pull request #498 from mwhudson/validate-raid-lvm-answers
...
when assembling vg from answers, check devices are ok_for_lvm_vg
2019-05-30 10:23:58 +12:00
Michael Hudson-Doyle
4a22f22189
when assembling vg from answers, check devices are ok_for_lvm_vg
...
And similar for RAID. Fix a couple of the answers files that got this
wrong and only worked by chance.
2019-05-30 10:07:26 +12:00
Michael Hudson-Doyle
9bd9ecb1a2
Merge pull request #497 from mwhudson/make_boot_disk-tests
...
add some tests for FilesystemController.make_boot_disk
2019-05-29 16:11:04 +12:00
Michael Hudson-Doyle
a32b625404
add some tests for FilesystemController.make_boot_disk
2019-05-29 15:39:15 +12:00
Michael Hudson-Doyle
041ed1fadf
Merge pull request #496 from mwhudson/device-action-tests
...
add a tonne of tests for when various device actions are permitted
2019-05-29 11:41:52 +12:00
Michael Hudson-Doyle
3701438aa9
add a tonne of tests for when various device actions are permitted
...
Fix a bug on ppc64el this found.
2019-05-29 11:36:14 +12:00
Michael Hudson-Doyle
849b5f12f1
Merge pull request #494 from mwhudson/fs-actions-once
...
only run filesystem actions from answers once
2019-05-28 11:38:14 +12:00
Michael Hudson-Doyle
c1c9f0e174
only run filesystem actions from answers once
...
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.
2019-05-28 10:57:50 +12:00
Michael Hudson-Doyle
96a235f919
Merge pull request #493 from mwhudson/lv-available
...
a mounted lv should not be considered to be available
2019-05-28 10:34:32 +12:00
Michael Hudson-Doyle
85a7668926
a mounted lv should not be considered to be available
2019-05-28 10:26:25 +12:00
Michael Hudson-Doyle
fd7a56a8b5
Merge pull request #492 from mwhudson/fsmodel-tweaks
...
filesystem model tweaks
2019-05-24 09:21:53 +12:00
Michael Hudson-Doyle
2d145beaa8
add explicit marking of action reverse dependencies
...
I.e. reverse_depends(disk) yields the partitions.
2019-05-23 15:06:07 +12:00
Michael Hudson-Doyle
3484401a2a
make failure to progress errors clearer in FilesystemModel._render_actions
2019-05-23 15:04:42 +12:00
Michael Hudson-Doyle
f215ad536e
do not include _m in the repr() of action objects
2019-05-23 15:04:34 +12:00
Dimitri John Ledkov
c16ec51a9f
Update POTFILES.in
2019-05-22 16:13:00 +01:00
Michael Hudson-Doyle
ddaf916ea6
Merge pull request #491 from mwhudson/_can_MAKE_BOOT-UEFI
...
Fix Disk._can_MAKE_BOOT on a UEFI system
2019-05-22 15:52:29 +12:00
Michael Hudson-Doyle
4b77712f59
Fix Disk._can_MAKE_BOOT on a UEFI system
...
A recent refactoring left MAKE_BOOT action always enabled for the UEFI
bootloader mode. Fix + test.
2019-05-22 15:32:56 +12:00
Michael Hudson-Doyle
34b91eb1c4
Merge pull request #487 from mwhudson/slash-boot-anywhere
...
allow /boot to be on any kind of device
2019-05-22 14:27:13 +12:00
Dimitri John Ledkov
7d5a580f03
Merge pull request #481 from mwhudson/generic-delete
...
Add generic clear and delete methods to FilesystemController
2019-05-21 23:47:35 +01:00
Michael Hudson-Doyle
2585b4eff0
Add generic clear and delete methods to FilesystemController
...
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.
2019-05-21 14:02:01 +12:00
Michael Hudson-Doyle
d1c6bf47bc
Merge pull request #484 from mwhudson/fs-attr-reorg
...
canonicalize ptable, size, raidlevel values for filesystem actions
2019-05-21 13:59:04 +12:00
Michael Hudson-Doyle
51504086aa
Merge pull request #489 from mwhudson/fix-raid-vg-deletion
...
fix deletion of raid/volgroup with >1 partition/lv
2019-05-21 11:49:31 +12:00
Michael Hudson-Doyle
a57196a5e5
fix deletion of raid/volgroup with >1 partition/lv
...
"for x in obj.partitions(): self.delete_partition(x)" is unsafe when
delete_partition mutates the list .partitions() returns...
2019-05-21 11:01:54 +12:00
Michael Hudson-Doyle
63ba3873e6
Merge pull request #488 from mwhudson/no-etc-grub.d
...
configure curtin to avoid writing files to /target/etc/grub.d
2019-05-20 13:42:28 +12:00
Michael Hudson-Doyle
136afe173b
configure curtin to avoid writing files to /target/etc/grub.d
...
This will not actually do with the version of curtin we currently build
but it will not hurt either.
2019-05-20 12:08:02 +12:00
Michael Hudson-Doyle
8ea0433322
allow /boot to be on any kind of device
2019-05-15 14:52:34 +12:00