move kernel check out of oem specific code

This commit is contained in:
Michael Hudson-Doyle 2023-08-04 15:39:22 +12:00
parent ac4d39baf8
commit 7afd0e57ba
1 changed files with 6 additions and 6 deletions

View File

@ -273,12 +273,6 @@ class InstallController(SubiquityController):
) as child: ) as child:
await install_oem_metapackages(child) await install_oem_metapackages(child)
# If we already have a kernel installed, don't bother requesting
# curthooks to install it again or we might end up with two
# kernels.
if await list_installed_kernels(Path(self.tpath())):
self.model.kernel.curthooks_no_install = True
@with_context(description="installing system", level="INFO", childlevel="DEBUG") @with_context(description="installing system", level="INFO", childlevel="DEBUG")
async def curtin_install(self, *, context, source): async def curtin_install(self, *, context, source):
if self.app.opts.dry_run: if self.app.opts.dry_run:
@ -401,6 +395,12 @@ class InstallController(SubiquityController):
if self.supports_apt(): if self.supports_apt():
await self.pre_curthooks_oem_configuration(context=context) await self.pre_curthooks_oem_configuration(context=context)
# If we already have a kernel installed, don't bother requesting
# curthooks to install it again or we might end up with two
# kernels.
if await list_installed_kernels(Path(self.tpath())):
self.model.kernel.curthooks_no_install = True
await run_curtin_step( await run_curtin_step(
name="curthooks", name="curthooks",
stages=["curthooks"], stages=["curthooks"],