Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12827 - opengl-update with no parameters breaks stuff.
Summary: opengl-update with no parameters breaks stuff.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-28 01:32 UTC by Ajay Sharma
Modified: 2002-12-31 15:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to check for zero arguments (opengl-update.patch,258 bytes, patch)
2002-12-28 20:51 UTC, Ajay Sharma
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ajay Sharma 2002-12-28 01:32:13 UTC
when you run opengl-update to switch between the xfree and nvidia libraries it
doesn't work when you have no parameters:

# opengl-update 
 * Switching to  OpenGL interface...   [ok]

then your LDPATH is screwed up:

# cat /etc/env.d/09opengl 
LDPATH=/usr/lib/opengl//lib

it should read "LDPATH=/usr/lib/opengl/xfree/lib" (or nvidia instead of xfree).
 Also, the links it creates are pointing to invalid files:

/usr/lib/libGL.so -> /usr/lib/opengl//lib/
/usr/lib/libGL.so.1 -> /usr/lib/opengl//lib/

If I pass no argument to opengl-update, it should print out the usage() message
instead of telling me everything is okay.  I looked at the shell script but I
don't know anything about bash programming so I thought I'd just file a bug report.
Comment 1 Ajay Sharma 2002-12-28 20:51:51 UTC
Created attachment 6829 [details, diff]
patch to check for zero arguments

Here's a quick patch to solve the problem.  It just checks to see if the number
of arguments ("$#") equals 0 and prints the usage.  I'm not a bash shell
programmer so there's probably a better way to do it.  Maybe even print out if
your using xfree or nvidia when there are no arguments.. that'd be cooler.
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-31 15:15:28 UTC
Hrm, braindead moment there for me =)  Fixed like it should have been the
first time, thanks.  Try 1.5 ....