oem: disable OEM meta-packages installation on core boot classic

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
Olivier Gayot 2023-06-27 13:09:47 +02:00
parent e6ccfcc118
commit b844119b79
2 changed files with 9 additions and 3 deletions

View File

@ -589,6 +589,7 @@ Whether to install the available third-party drivers.
**default:**: `auto`
Whether to install the available OEM meta-packages. The special value `auto` - which is the default - enables the installation on ubuntu-desktop but not on ubuntu-server.
This option has no effect on core boot classic.
<a name="snaps"></a>

View File

@ -124,10 +124,15 @@ class OEMController(SubiquityController):
with context.child("wait_apt"):
await self._wait_apt.wait()
# Skip looking for OEM meta-packages if we are running ubuntu-server.
# OEM meta-packages expect the default kernel flavor to be HWE (which
# is only true for ubuntu-desktop).
# Only look for OEM meta-packages on supported variants and if we are
# not running core boot.
variant: str = self.app.base_model.source.current.variant
fs_controller = self.app.controllers.Filesystem
if fs_controller.is_core_boot_classic():
log.debug("listing of OEM meta-packages disabled on core boot"
" classic")
self.model.metapkgs = []
return
if not self.model.install_on[variant]:
log.debug("listing of OEM meta-packages disabled on %s", variant)
self.model.metapkgs = []