Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show multiple bootloader devices on the Manual Partitioning screen #4271

Merged

Conversation

poncovka
Copy link
Contributor

Don't keep bootloader devices in a dictionary of mount points. Otherwise, we
can loose information about bootloader devices of the same type (like biosboot)
and show only one of them on the Manual Partitioning screen in GUI.

All devices used by an OS installation are now represented by the devices
property of the OSData structure. The list of devices includes bootloader
devices, mount point sources and swap devices. The swap_devices property
was removed.

Related: rhbz#2088113
Related: rhbz#2093793
Related: rhbz#1913035

@poncovka poncovka added manual testing required This issue can't be merged without manual testing f38 Fedora 38 labels Aug 16, 2022
mounts = {
d.format.mountpoint: d for d in devices
if getattr(d.format, "mountpoint", None)
}

for device in devices:
if device in bootloader_devices:
mounts[device.format.name] = device
Copy link
Member

@jkonecny12 jkonecny12 Aug 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a bad feeling about removing this part. Don't we really need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is exactly that code that adds bootloader devices to a dictionary of mount points, so if you have two biosboot devices, you will end up with only one of them. Without this change, the rest of it is pointless.

Copy link
Contributor

@rvykydal rvykydal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy-paste the `copy` method of the `Blivet` class, so we can later change it.
It manipulates with collected installation roots, but these objects are part
of Anaconda, not Blivet. Blivet should remove this code. Then we can call
`super().copy()` to create a Blivet copy.
Define the `roots` attribute in Anaconda, so Blivet can remove it.
Move the code for creating copies of installation roots to the `Root` class.
Simplify the implementation, so it should be easier to change it later.
Don't keep bootloader devices in a dictionary of mount points. Otherwise, we
can loose information about bootloader devices of the same type (like biosboot)
and show only one of them on the Manual Partitioning screen in GUI.

All devices used by an OS installation are now represented by the `devices`
property of the `OSData` structure. The list of devices includes bootloader
devices, mount point sources and swap devices. The `swap_devices` property
was removed.

Related: rhbz#2088113
Related: rhbz#2093793
Related: rhbz#1913035
Add unit tests for our redefinition of the Blivet.copy method.
@poncovka poncovka force-pushed the master-multiple_bootloader_devices branch from 345dd9e to 8b00e62 Compare August 22, 2022 12:45
@poncovka poncovka marked this pull request as ready for review August 22, 2022 12:47
@poncovka
Copy link
Contributor Author

poncovka commented Aug 22, 2022

Unfortunately, Blivet still contains some code that manipulates with our installation roots. The pull request uses some temporary workarounds to deal with that and can be merged without storaged-project/blivet#1069.

@poncovka
Copy link
Contributor Author

/kickstart-test --testtype smoke

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well. :)

@poncovka poncovka removed the manual testing required This issue can't be merged without manual testing label Aug 23, 2022
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f38 Fedora 38
5 participants