do not display a message about OEM configuration if no metapackages
This commit is contained in:
parent
d2f3db6463
commit
81bad123d0
|
@ -224,8 +224,8 @@ class InstallController(SubiquityController):
|
|||
device_map = json.load(fp)
|
||||
self.app.controllers.Filesystem.update_devices(device_map)
|
||||
|
||||
@with_context(description="configuring OEM packages")
|
||||
async def pre_curthooks_oem_configuration(self, context):
|
||||
async def install_oem_metapackages(ctx):
|
||||
# For OEM, we basically mimic what ubuntu-drivers does:
|
||||
# 1. Install each package with apt-get install
|
||||
# 2. For each package, run apt-get update using only the source
|
||||
|
@ -236,9 +236,11 @@ class InstallController(SubiquityController):
|
|||
# NOTE In ubuntu-drivers, this is done in a single call to apt-get
|
||||
# install.
|
||||
for pkg in self.model.oem.metapkgs:
|
||||
await self.install_package(package=pkg.name)
|
||||
await self.install_package(package=pkg.name, context=ctx)
|
||||
|
||||
if not self.model.network.has_network:
|
||||
return
|
||||
|
||||
if self.model.network.has_network:
|
||||
for pkg in self.model.oem.metapkgs:
|
||||
source_list = f"/etc/apt/sources.list.d/{pkg.name}.list"
|
||||
await run_curtin_command(
|
||||
|
@ -263,6 +265,14 @@ class InstallController(SubiquityController):
|
|||
for pkg in self.model.oem.metapkgs:
|
||||
await self.install_package(package=pkg.name)
|
||||
|
||||
if not self.model.oem.metapkgs:
|
||||
return
|
||||
|
||||
with context.child(
|
||||
"install_oem_metapackages", "installing applicable OEM metapackages"
|
||||
) as 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.
|
||||
|
|
Loading…
Reference in New Issue