GNOME Bugzilla – Bug 694428
wizard: Don't reuse the same installer media
Last modified: 2016-03-31 13:22:07 UTC
See patch
Created attachment 237159 [details] [review] wizard: Don't reuse the same installer media Currently it't not possible to launch multiple installations off the same installer media (if chosen from media menu). This patch fixes the issue by treating the original media user selected as template and creating new media for each installation.
Review of attachment 237159 [details] [review]: ::: src/wizard-source.vala @@ +327,3 @@ + private async void on_media_selected (InstallerMedia media) { + try { + install_media = yield media_manager.create_installer_media_from_media (media); This seems a bit weird. MediaManager already ran create_installer_media_from_media() on object returned from create_for_path() or create_from_iso_info(). Do we really need to run all that code again, and is that safe? What exactly is causing the parallel installs to not work?
Review of attachment 237159 [details] [review]: ::: src/wizard-source.vala @@ +327,3 @@ + private async void on_media_selected (InstallerMedia media) { + try { + install_media = yield media_manager.create_installer_media_from_media (media); Yes to first part. I can look into optimizing that part. It should be as safe as when this code is first run. :) The problem is mainly that we have state in this object and if we use the same instance for multiple parallel installs, we are bound to have issues.
Review of attachment 237159 [details] [review]: ::: src/wizard-source.vala @@ +327,3 @@ + private async void on_media_selected (InstallerMedia media) { + try { + install_media = yield media_manager.create_installer_media_from_media (media); It seems like we could avoid doing tthe create_installer_media_from_media the first time then? Anyway, i guess this can go in for now, but it seems it can be made a bit less complex/inefficient in the future.
Attachment 237159 [details] pushed as b496891 - wizard: Don't reuse the same installer media I had forgotten to include the part about making MediaManager.create_installer_media_from_media, public but since it was implied in this patch and a minor change, I took the liberty to include that change.