Simplify blivet_btrfs_preserve_home, drop unneeded needles
There's no need to do all this 'check whether it's selected and click it if not' stuff (for three different mount points). Just always click it. If it's already selected, clicking it again doesn't hurt (one of these stanzas even clicks it *even if it's selected*!) If we need to cover both cases, we just need two needles with the same tag, we don't need separate code paths. In each case, though, we actually haven't matched one of the needles for ages (the most recent was part_boot_selected, but now we're using GPT by default, we won't hit that any more as it'll be the BIOS boot partition that's selected by default), so delete the needles we aren't matching any more. If we *do* hit any case where we need to handle the 'other' state, we can just add the alternative needle with the same tag. Signed-off-by: Adam Williamson <awilliam@redhat.com>
@ -10,6 +10,6 @@
|
|||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"anaconda_blivet_part_inactive_boot"
|
"anaconda_blivet_part_boot"
|
||||||
]
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@ -10,6 +10,6 @@
|
|||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"anaconda_blivet_part_inactive_boot"
|
"anaconda_blivet_part_boot"
|
||||||
]
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"xpos": 342,
|
|
||||||
"ypos": 307,
|
|
||||||
"width": 112,
|
|
||||||
"height": 18,
|
|
||||||
"type": "match"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"anaconda_blivet_part_boot_selected"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 70 KiB |
@ -10,6 +10,6 @@
|
|||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"anaconda_blivet_part_efi_selected"
|
"anaconda_blivet_part_efi"
|
||||||
]
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
@ -10,6 +10,6 @@
|
|||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"anaconda_blivet_part_inactive_home"
|
"anaconda_blivet_part_home"
|
||||||
]
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"xpos": 264,
|
|
||||||
"height": 19,
|
|
||||||
"ypos": 330,
|
|
||||||
"width": 40,
|
|
||||||
"type": "match"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"anaconda_blivet_part_home_selected"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 76 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 17,
|
|
||||||
"width": 108,
|
|
||||||
"ypos": 308,
|
|
||||||
"type": "match",
|
|
||||||
"xpos": 340
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"anaconda_blivet_part_inactive_efi"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 74 KiB |
@ -13,11 +13,10 @@ sub run {
|
|||||||
|
|
||||||
if (get_var("UEFI")) {
|
if (get_var("UEFI")) {
|
||||||
# if we're running on UEFI, let us reformat the UEFI first
|
# if we're running on UEFI, let us reformat the UEFI first
|
||||||
# Select the UEFI partition if it is not selected by default
|
# Select the UEFI partition if it is not selected by default;
|
||||||
if (not(check_screen "anaconda_blivet_part_efi_selected", 30)) {
|
# if it is, clicking it is harmless
|
||||||
assert_and_click "anaconda_blivet_part_inactive_efi";
|
assert_and_click "anaconda_blivet_part_efi";
|
||||||
wait_still_screen 5;
|
wait_still_screen 5;
|
||||||
}
|
|
||||||
|
|
||||||
# Go to the partition settings
|
# Go to the partition settings
|
||||||
assert_and_click "anaconda_blivet_part_edit";
|
assert_and_click "anaconda_blivet_part_edit";
|
||||||
@ -35,13 +34,8 @@ sub run {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Reformat the /boot partition
|
# Reformat the /boot partition
|
||||||
if (check_screen "anaconda_blivet_part_boot_selected", 30) {
|
assert_and_click "anaconda_blivet_part_boot";
|
||||||
assert_and_click "anaconda_blivet_part_boot_selected";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
assert_and_click "anaconda_blivet_part_inactive_boot";
|
|
||||||
wait_still_screen 5;
|
wait_still_screen 5;
|
||||||
}
|
|
||||||
|
|
||||||
# Go to the partition settings
|
# Go to the partition settings
|
||||||
assert_and_click "anaconda_blivet_part_edit";
|
assert_and_click "anaconda_blivet_part_edit";
|
||||||
@ -60,9 +54,7 @@ sub run {
|
|||||||
assert_and_click "anaconda_blivet_volumes_icon";
|
assert_and_click "anaconda_blivet_volumes_icon";
|
||||||
|
|
||||||
# Select the home partition
|
# Select the home partition
|
||||||
if (not(check_screen "anaconda_blivet_part_home_selected")) {
|
assert_and_click "anaconda_blivet_part_home";
|
||||||
assert_and_click "anaconda_blivet_part_inactive_home";
|
|
||||||
}
|
|
||||||
# Go to the partition settings
|
# Go to the partition settings
|
||||||
assert_and_click "anaconda_blivet_part_edit";
|
assert_and_click "anaconda_blivet_part_edit";
|
||||||
# Select the Set mountpoint option
|
# Select the Set mountpoint option
|
||||||
|