Merge Yao's fixes again.

This commit is contained in:
Michael Hudson-Doyle 2023-08-17 14:33:20 +12:00
commit f86a1ef789
2 changed files with 21 additions and 14 deletions

View File

@ -547,7 +547,7 @@ class InstallController(SubiquityController):
cmd = [
"efibootmgr",
"--bootorder",
",".join(efi_state_before.order),
",".join(efi_state_before.order + [new_bootnum]),
]
rp_bootnum = new_bootnum
await self.app.command_runner.run(cmd)
@ -579,7 +579,7 @@ class InstallController(SubiquityController):
if rp_partuuid is None:
# Most likely case: we are not running from an reset partition
return
rp = self.app.base_model.partition_by_partuuid(rp_partuuid)
rp = self.app.base_model.filesystem.partition_by_partuuid(rp_partuuid)
if rp is None:
# This shouldn't happen, but don't crash.
return

View File

@ -264,7 +264,7 @@ class TestInstallController(unittest.IsolatedAsyncioTestCase):
[
"efibootmgr",
"--bootorder",
"0000,0002",
"0000,0002,0003",
]
),
]
@ -295,7 +295,14 @@ class TestInstallController(unittest.IsolatedAsyncioTestCase):
[
"efibootmgr",
"--bootorder",
"0000,0002",
"0000,0002,0003",
]
),
call(
[
"efibootmgr",
"--bootnext",
"0003",
]
),
]