hybrid-detect only checks for amd64, not i386 (unreachable code)

Bug #1096354 reported by Dennis Baurichter on 2013-01-05
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Undecided
Unassigned
Quantal
Medium
Unassigned

Bug Description

There seems to be a copy-paste-error in /share/hybrid/hybrid-detect.c, line 187 ff.:
> char *arch = NULL;
> arch = get_output("dpkg --print-architecture");
> if (strcmp(arch, "amd64") == 0) {
> arch_path = "x86_64-linux-gnu";
> }
> else if (strcmp(arch, "amd64") == 0) {
> arch_path = "i386-linux-gnu";
> }
> else {

Both "if"s check for "amd64", but the second one should probably check for "i386". I didn't test it, but at the moment "arch_path = "i386-linux-gnu";" is unreachable.

Same in quantal-updates and raring-proposed branch of ubuntu-drivers-common.

Martin Pitt (pitti) wrote :

Nice catch, danke! Fixed in git.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.2.74) raring; urgency=low

  [ Martin Pitt ]
  * hybrid-detect.c: Fix detection of i386 architecture. Thanks Dennis
    Baurichter! (LP: #1096354)

  [ Alberto Milone ]
  * NvidiaDetector/nvidiadetector.py: Exclude -current from the
    recommended flavours. The -current flavour is now a transitional
    package therefore we should not recommend it any more.
  * UbuntuDrivers/kerneldetection.py, UbuntuDrivers/detect.py,
    tests/ubuntu_drivers.py: Add support for checking and suggesting
    the required linux headers.
 -- Alberto Milone <email address hidden> Tue, 29 Jan 2013 13:30:50 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: Fix Committed → Fix Released

Hello Dennis, or anyone else affected,

Accepted ubuntu-drivers-common into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.2.71.2 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in ubuntu-drivers-common (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → Medium
status: Triaged → Fix Committed
tags: added: verification-needed

Hello Brian,

I'm using 64bit Ubuntu so I can't easily test this, but I think the code
should work now (assuming it already worked on amd64 before). I just saw
the copy-paste-error while looking for information on what this program
does.

On a 32bit Ubuntu system (not mine, no hybrid graphics):
$ dpkg --print-architecture
i386

The fix for this bug has been awaiting testing feedback in the -proposed repository for quantal for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Steve Langasek (vorlon) wrote :

This SRU has remained unverified after 247 days in the -proposed queue. I've removed it now from quantal-proposed and am marking the task 'wontfix'.

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

Other bug subscribers