** Changed in: ubuntu-drivers-common (Ubuntu) Importance: Undecided => High
** Changed in: ubuntu-drivers-common (Ubuntu) Assignee: (unassigned) => Alberto Milone (albertomilone) -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to ubuntu-drivers-common in Ubuntu. https://bugs.launchpad.net/bugs/1966413 Title: --no-oem option is broken Status in ubuntu-drivers-common package in Ubuntu: Confirmed 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://git.launchpad.net/ubiquity/tree/scripts/simple-plugins#n20 * 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-drivers-common from the system being installed. But going forward, we might have to ship ubuntu-drivers- common in the subiquity snap. This means we will fetch the deb from jammy-updates since subiquity is a core22-based snap. [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/ubuntu-drivers", line 490, in <module> greet() File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1134, in invoke Command.invoke(self, ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/bin/ubuntu-drivers", line 376, in greet config.no_oem = install_oem_meta NameError: name 'install_oem_meta' is not defined ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: ubuntu-drivers-common 1:0.9.0~0.20.04.1 ProcVersionSignature: Ubuntu 5.13.0-37.42~20.04.1-generic 5.13.19 Uname: Linux 5.13.0-37-generic x86_64 ApportVersion: 2.20.11-0ubuntu27.18 Architecture: amd64 CasperMD5CheckResult: skip 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_DIR=<set> LANG=fr_FR.UTF-8 SHELL=/bin/bash SourcePackage: ubuntu-drivers-common UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1966413/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp