nvidia_desktop_pre_installation_hook raises on package names with suffixes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-drivers-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The function nvidia_
However this does not account for the '-open' drivers. The following code from that function is at fault:
```
# Enable KMS if nvidia >= 470
for package_name in to_install:
if package_
try:
except ValueError:
pass
finally:
```
The line `version = int(package_
This code could be fixed by switching to a regex, or else retrying with index -2 rather than index -1.
Also, the `finally` clause will always fail-- there should only ever be one matching `nvidia-driver-` prefixed package, and if that raises a ValueError, then `version` will not be set, raising an UnboundLocalError.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.19.0-41-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Tue May 9 10:47:07 2023
InstallationDate: Installed on 2022-08-20 (261 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/zsh
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
Hi Fox, can you try ubuntu-drivers 1:0.9.6.2~0.22.04.3 from proposed, please?
The problem should be LP: #1993019