-
Notifications
You must be signed in to change notification settings - Fork 349
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
Show multiple bootloader devices on the Manual Partitioning screen #4271
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
345dd9e
to
8b00e62
Compare
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. |
/kickstart-test --testtype smoke |
There was a problem hiding this 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. :)
There was a problem hiding this 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!
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 bootloaderdevices, mount point sources and swap devices. The
swap_devices
propertywas removed.
Related: rhbz#2088113
Related: rhbz#2093793
Related: rhbz#1913035