ubuntu-drivers-common fails when no PATH environment variable is passed

Bug #1854472 reported by Alberto Milone
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
Medium
Alberto Milone
Bionic
Fix Released
Medium
Alberto Milone
Eoan
Fix Released
Medium
Alberto Milone

Bug Description

SRU Request:

[Impact]

 * ubuntu-drivers-common fails when no PATH environment variable is passed:

https://errors.ubuntu.com/problem/52d04f39f8cbdb77d65ec57f19a5801284c1e2b0

 * While the reasons why the PATH variable is empty are unknown, the ubuntu-drivers tools should be more robust and not fail, and we can expect a minimal PATH (such as /sbin:/usr/sbin:/bin:/usr/bin) to be available on the system.

[Test Case]

 * Install ubuntu-drivers-common from the -proposed repository.

 * Call the ubuntu drivers tool passing the "devices" parameter:
   ubuntu-drivers devices

 * Call the ubuntu drivers tool passing the "devices" parameter and an empty PATH variable:
   PATH="" /usr/bin/ubuntu-drivers devices

 * Neither case should fail any more.

[Regression Potential]

 * Low. Nothing really changes in the functioning if the PATH variable is not empty.

Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Eoan):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Bionic):
importance: Undecided → Medium
Changed in ubuntu-drivers-common (Ubuntu Eoan):
importance: Undecided → Medium
Changed in ubuntu-drivers-common (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu Eoan):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.7.6.1) focal; urgency=medium

  * Make sure that the PATH environment variable is set (LP: #1854472).

 -- Alberto Milone <email address hidden> Fri, 29 Nov 2019 11:06:12 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alberto, or anyone else affected,

Accepted ubuntu-drivers-common into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.7.6.0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-eoan
Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Alberto, or anyone else affected,

Accepted ubuntu-drivers-common into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.5.2.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Alberto Milone (albertomilone) wrote :

I can confirm that the problem is solved in bionic:

:~$ PATH="" /usr/bin/ubuntu-drivers devices
:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.5.2.5
  Candidate: 1:0.5.2.5
  Version table:
 *** 1:0.5.2.5 400
        400 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.5.2.4 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     1:0.5.2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Alberto Milone (albertomilone) wrote :

This my verification for eoan.

This is the old package and the failure:

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.7.6
  Candidate: 1:0.7.6
  Version table:
 *** 1:0.7.6 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
        100 /var/lib/dpkg/status

:~$ PATH="" /usr/bin/ubuntu-drivers devices
ERROR:root:could not open aplay -l
Traceback (most recent call last):
  File "/usr/share/ubuntu-drivers-common/detect/sl-modem.py", line 38, in detect
    universal_newlines=True)
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'aplay': 'aplay'
Traceback (most recent call last):
  File "/usr/bin/ubuntu-drivers", line 268, in <module>
    sys.exit(command(args))
  File "/usr/bin/ubuntu-drivers", line 85, in command_devices
    sys_path=sys_path, freeonly=args.free_only)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 543, in system_device_drivers
    if not _is_manual_install(apt_cache[pkg]):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 226, in _is_manual_install
    stderr=subprocess.PIPE)
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'modinfo': 'modinfo'

And this is what happens after installing the package in eoan-proposed:

:~$ PATH="" /usr/bin/ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0 ==
modalias : pci:v00008086d000024FDsv00008086sd00000010bc02sc80i00
vendor : Intel Corporation
model : Wireless 8265 / 8275 (Dual Band Wireless-AC 8265)
driver : backport-iwlwifi-dkms - distro free

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.7.6.0.1
  Candidate: 1:0.7.6.0.1
  Version table:
 *** 1:0.7.6.0.1 400
        400 http://archive.ubuntu.com/ubuntu eoan-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.7.6 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.7.6.0.1) eoan; urgency=medium

  * Make sure that the PATH environment variable is set (LP: #1854472).

 -- Alberto Milone <email address hidden> Fri, 29 Nov 2019 11:06:12 +0100

Changed in ubuntu-drivers-common (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-drivers-common has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.5.2.5) bionic; urgency=medium

  * ubuntu-drivers:
    - Make sure that the PATH environment variable is set (LP: #1854472).

 -- Alberto Milone <email address hidden> Mon, 02 Dec 2019 10:31:00 +0100

Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.