Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21450 - add --get-implementation to opengl-update
Summary: add --get-implementation to opengl-update
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 14541 20505 (view as bug list)
Depends on:
Blocks: 14541
  Show dependency tree
 
Reported: 2003-05-21 21:32 UTC by Robin Johnson
Modified: 2004-05-31 00:23 UTC (History)
3 users (show)

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


Attachments
ChangeLog patch for new version of opengl-update (ChangeLog.patch,702 bytes, patch)
2003-05-21 22:39 UTC, Robin Johnson
Details | Diff
New version of opengl-update (opengl-update-1.6,5.69 KB, text/plain)
2003-05-21 22:41 UTC, Robin Johnson
Details
Ebuild for new opengl-update (opengl-update-1.6.ebuild,684 bytes, text/plain)
2003-05-21 22:43 UTC, Robin Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 21:32:07 UTC
I was setting up a system with a very plain matrox graphics card.
I put in a longish emerge line and left it for a few days, only to come back 
and find it tripped over opengl not being configured.
it wanted me to run 'opengl-update xfree' so I could continue.
Since the many are without nvidia or ati cards, the only driver ever installed 
on them in the xfree openGL. so could opengl-update configure itself for a 
driver when it installs initially?

Patch with full autodetection functionality in opengl-update to follow shortly.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 22:39:52 UTC
Created attachment 12273 [details, diff]
ChangeLog patch for new version of opengl-update
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 22:41:42 UTC
Created attachment 12274 [details]
New version of opengl-update

Adds --get (bug #14541), --autodetect
Cleans up code.
Adds mention of ATI in documentation (bug #20505).
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 22:43:02 UTC
Created attachment 12275 [details]
Ebuild for new opengl-update

new ebuild for updated version. runs --autodetect if no driver is previously
configured after installing.
Depends on sys-apps/pciutils for lspci in new version.
(Can't use 'cat /proc/pci' as that is gone in 2.5/2.6 kernels).
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 22:47:20 UTC
There are the promised patches and updated programs.
I've tested them with some Nvidia systems and non-nvidia systems. I don't have an ATI system that is supported by the ATI driver to be really sure of that on, but otherwise the code seems to behave correctly.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-22 00:09:49 UTC
No offense, but are you on crack or something ?

1) If you install xfree, and its the first time opengl-update gets installed,
   it will default to the xfree profile.  If this do not happen, then that
   is a bug;  but this worked fine when I did a new system two days ago.

2) If you subsequently install opengl-update/xfree, it will not change the
   profile if it is already set.

3) If you install nvidia-glx, it will change the profile to nvidia, as
   the logic go that somebody using DRI/ati drivers will not install
   nvidia-glx

If the Ati drivers do not set the profile to 'ati', when you merge them,
then they are broken.  Same goes for any other non xfree drivers.

Anyhow, the first time opengl-update is installed, you wont have
nvidia/ati/whatever drivers installed anyhow, so your detection stuff
is for naught.

Lastly, now you want it to depend on pciutils and complicate things
for no major reason.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-22 03:25:22 UTC
Ok, I did some more checking to see why opengl-update didn't kick in automatically like it should have (I double checked the ebuild, and it SHOULD).

To reproduce it the bug with it not kicking in, on a system with no nvidia/ati drivers (assuming xfree is installed already):
"emerge unmerge xfree"
now there will be some broken links in /usr/X11R6/lib
"rm /usr/X11R6/lib/*GL*"
this now roughly replicates a system without Xfree installed
"emerge -k xfree"
This should bring xfree back in from your binary package, and SHOULD setup the GL links again.
I do see it run opengl-update, but it doesn't put them in.

One thing I did miss noting was the opengl-update gets installed before xfree. So the section of my ebuild running the --autodetect is bogus.

I do have a system with both a supported nvidia (PCI) and a supported ATI card (AGP) in it. I it did run gentoo previously, and I had to repeatedly restart X after shutting down to run opengl-config to switch stuff between which monitor I wanted to run it. The machine went back to windows because only there could OpenGL run on both cards simultaneously sucessfully.

If you read the opengl-update I attached, I added more stuff beyond the autodetection (some of the other open bugs for opengl-update). It would be trivial to remove the autodetection for now.
You could just 'cat /proc/pci' instead of 'lspci' to get the same result without depending on pciutils, but that WILL break in 2.5/2.6 in the future as Linus said he was going to remove /proc/pci.

The autodetection code itself certainly doesn't hurt, I'm certain some users will have use for it. I can see it having some use on the GameCDs as well to support the ATI drivers and the Nvidia drivers easily.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-22 13:37:13 UTC
libGL symlinks are in /usr/lib.

Yes, the auto stuff might ease things for the live cd.  There are however
some other major changes needed, but I have not gotten the chance to figure
them out yet.  Ill check with Daniel/livewire and try to get to this and
all that as soon as I get time.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-26 22:39:54 UTC
As per what you said about the ATI drivers being broken for not automatically setting the opengl driver to ati, this is drobbin's comment in their ebuild (media-video/ati-drivers/ati-drivers-2.9.12.ebuild):
"Ebuild shouldn't do this automatically, just tell the user to do it: (drobbins, 1 May 2003)"

Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2003-05-28 22:45:18 UTC
so is this bug even valid any more?
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-29 00:33:55 UTC
The auto-detection code is still there in this and functionality. However my modifications to the ebuild are un-needed.
Comment 11 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-02 01:29:50 UTC
*** Bug 20505 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2003-07-14 20:22:55 UTC
*** Bug 14541 has been marked as a duplicate of this bug. ***
Comment 13 SpanKY gentoo-dev 2003-07-14 20:24:49 UTC
i still want the --get-implementation because i keep having to modify GL code in 
apps depending on whether the user is using XFree or NVidia ... 
 
rather than just doing some hack to detect whether code (without patches) will 
work, i'd like official support 
Comment 14 Donnie Berkholz (RETIRED) gentoo-dev 2004-05-28 01:32:15 UTC
Fixed in 1.7.
Comment 15 gent_bz 2004-05-29 21:02:48 UTC
As part of the addition of --get-implementation, addition of a --help option (or extension of the explanatory message) would be appropriate.
Comment 16 Donnie Berkholz (RETIRED) gentoo-dev 2004-05-31 00:23:43 UTC
Thanks for the idea.

I added comments within opengl-update. It isn't in the printed help message to avoid confusing users since the options are intended for developer use, but at least they're documented somewhere now.