`ubuntu-drivers install --gpgpu` is strangely permissive about input with version numbers

Bug #1818748 reported by Dan Watkins on 2019-03-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
High
Alberto Milone

Bug Description

When trying to work out what the correct input format for installation was (cf. bug 1818746), I discovered that `install --gpgpu` is extremely permissive with what strings it will accept when a version number is given:

```
# The correct invocation (AIUI)
$ ubuntu-drivers install --gpgpu nvidia:410
nvidia-headless-no-dkms-410
...

# What I was trying
$ ubuntu-drivers install --gpgpu nvidia-driver:410
nvidia-headless-no-dkms-410
...

# A suffix of nvidia (which also happens to be the name of a free driver)
$ ubuntu-drivers install --gpgpu nv:410
nvidia-headless-no-dkms-410
...

# No driver name at all!
$ ubuntu-drivers install --gpgpu :410
nvidia-headless-no-dkms-410
...
```

This level of flexibility is actually quite confusing for users, because they don't know what the Right thing to pass in is. Furthermore, it's going to lead to some confusing scripting down the line (consider a case where there's more than one nvidia family of drivers; what would "nv:410" resolve to?)

I think not accepting anything but the actual name ("nvidia") is the right thing to do here (and is the behaviour when a version isn't specified).

description: updated
Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu):
importance: Medium → High
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.6.2

---------------
ubuntu-drivers-common (1:0.6.2) disco; urgency=medium

  * UbuntuDrivers/detect.py,
    tests/ubuntu_drivers.py,
    ubuntu-drivers:
    - Fix argument parsing when only one argument is passed to --gpgpu.
    - Be more strict about the allowed arguments for --gpgpu (LP: #1818748).

 -- Alberto Milone <email address hidden> Wed, 06 Mar 2019 15:18:26 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Dan Watkins (daniel-thewatkins) wrote :

Thanks for the speedy fix, Alberto!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers