[SRU] --no-oem option is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-drivers-common (Ubuntu) |
Fix Released
|
High
|
Alberto Milone | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Alberto Milone | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Alberto Milone |
Bug Description
[Impact]
* ubuntu-drivers supports the --no-oem option, which is meant to filter-out the OEM metapackages when running on certified hardware.
* When ubuntu-drivers is invoked with --no-oem as a global option (i.e., `ubuntu-drivers --no-oem list` or `ubuntu-drivers --no-oem install`, the script crashes with the following exception:
NameError: name 'install_oem_meta' is not defined
* When ubuntu-drivers is invoked with --no-oem as a sub-option of "install" (i.e., `ubuntu-drivers install --no-oem`), the script does not crash but the option is silently ignored - resulting in an OEM metapackage to be installed if we are running on certified hardware. This defeats the purpose of the option.
* Today, the --no-oem option can be passed to ubuntu-drivers by ubiquity as a suboption of `ubuntu-drivers install`. By default, the option is not passed to ubuntu-drivers but the users can opt-in using preseeds. If they do, their decision is essentially ignored since the OEM metapackage will still be installed:
https:/
* As part of the 23.10 cycle, subiquity will start replacing the functionality from ubiquity for OEM installs. At the moment, subiquity relies on the version of ubuntu-
[Test plan]
1. We will compare the result of the following commands with and without the patch (both on certified and on un-certified hardware):
* ubuntu-drivers --no-oem list
-> crashes without the patch. Should not crash with the patch. The list returned should not include the OEM metapackage.
* ubuntu-drivers --no-oem install
-> crashes without the patch. Should not crash with the patch. The list of packages installed should not include the OEM metapackage.
* ubuntu-drivers install --no-oem
-> without the patch, the OEM metapackage gets installed on certified hardware. With the patch, it should not.
2. We will ensure ubiquity stills manages to install ubuntu on certified hardware. We will also ensure that the OEM metapackage does not get installed when it should not.
[Where problems could occur]
* When used as a global option, --no-oem currently makes the script crash unconditionally. Therefore, the change should be very low risk in that regard.
* When used as a suboption of "install", the --no-oem option currently gets ignored silently. If people have been automating ubuntu deployment in one way or another and have used --no-oem, they might be surprised to notice that fewer packages get installed on their target system, after the option is fixed. This is theoretically a good thing, but might require some adjustments on their end.
[Original description]
$ ubuntu-drivers --no-oem install
Traceback (most recent call last):
File "/usr/bin/
greet()
File "/usr/lib/
return self.main(*args, **kwargs)
File "/usr/lib/
rv = self.invoke(ctx)
File "/usr/lib/
Command.
File "/usr/lib/
return ctx.invoke(
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/bin/
config.no_oem = install_oem_meta
NameError: name 'install_oem_meta' is not defined
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.13.0-37-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Fri Mar 25 11:44:15 2022
InstallationDate: Installed on 2022-03-25 (0 days ago)
InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819)
ProcEnviron:
TERM=xterm-kitty
PATH=(custom, no user)
XDG_RUNTIME_
LANG=fr_FR.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
description: | updated |
description: | updated |
Changed in ubuntu-drivers-common (Ubuntu): | |
importance: | Undecided → High |
assignee: | nobody → Alberto Milone (albertomilone) |
Changed in ubuntu-drivers-common (Ubuntu Kinetic): | |
status: | New → Won't Fix |
summary: |
- --no-oem option is broken + [SRU] --no-oem option is broken |
Changed in ubuntu-drivers-common (Ubuntu Jammy): | |
assignee: | nobody → Alberto Milone (albertomilone) |
Changed in ubuntu-drivers-common (Ubuntu Lunar): | |
assignee: | nobody → Alberto Milone (albertomilone) |
status: | New → In Progress |
Changed in ubuntu-drivers-common (Ubuntu Jammy): | |
status: | New → In Progress |
Status changed to 'Confirmed' because the bug affects multiple users.