Exception: Bootloader::ProposalClient::MismatchBootloader
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Bootloader::ProposalClient::MismatchBootloader
- Includes:
- Yast::I18n
- Defined in:
- src/lib/bootloader/proposal_client.rb
Overview
Error when during update media is booted by different technology than target system.
Instance Method Summary collapse
- #boot_map ⇒ Object
-
#initialize(old_bootloader, new_bootloader) ⇒ MismatchBootloader
constructor
A new instance of MismatchBootloader.
- #user_message ⇒ Object
Constructor Details
#initialize(old_bootloader, new_bootloader) ⇒ MismatchBootloader
Returns a new instance of MismatchBootloader.
20 21 22 23 24 25 26 27 28 |
# File 'src/lib/bootloader/proposal_client.rb', line 20 def initialize(old_bootloader, new_bootloader) @old_bootloader = old_bootloader @new_bootloader = new_bootloader raise "Invalid old bootloader #{old_bootloader}" unless boot_map[old_bootloader] raise "Invalid new bootloader #{new_bootloader}" unless boot_map[new_bootloader] super("Mismatching bootloaders") end |
Instance Method Details
#boot_map ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'src/lib/bootloader/proposal_client.rb', line 30 def boot_map textdomain "bootloader" { # TRANSLATORS: kind of boot. It is term for way how x86_64 can boot "grub2" => _("Legacy BIOS boot (GRUB2)"), # TRANSLATORS: kind of boot. It is term for way how x86_64 can boot "grub2-efi" => _("GRUB2 for EFI boot"), # TRANSLATORS: kind of boot. It is term for way how can boot. "systemd-boot" => _("Systemd boot"), # TRANSLATORS: grub2 adapted bootloader to conform Boot Loader Specification (BLS). "grub2-bls" => _("GRUB2 with BLS boot") } end |
#user_message ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'src/lib/bootloader/proposal_client.rb', line 45 def textdomain "bootloader" # TRANSLATORS: keep %{} intact. It will be replaced by kind of boot format(_( "Cannot upgrade the bootloader because of a mismatch of the boot technology. " \ "The upgraded system uses <i>%{old_boot}</i> while the installation medium " \ "has been booted using <i>%{new_boot}</i>.<br><br>" \ "This scenario is not supported, the upgraded system may not boot " \ "or the upgrade process can fail later." \ "<br>Alternatively, go to the bootloader settings (ignore the read settings " \ "warnings) and select the old bootloader <i>%{old_boot2}</i> again." ), old_boot: boot_map[@old_bootloader], new_boot: boot_map[@new_bootloader], old_boot2: boot_map[@old_bootloader]) end |