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.
Created attachment 12273 [details, diff] ChangeLog patch for new version of opengl-update
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).
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).
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.
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.
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.
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.
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)"
so is this bug even valid any more?
The auto-detection code is still there in this and functionality. However my modifications to the ebuild are un-needed.
*** Bug 20505 has been marked as a duplicate of this bug. ***
*** Bug 14541 has been marked as a duplicate of this bug. ***
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
Fixed in 1.7.
As part of the addition of --get-implementation, addition of a --help option (or extension of the explanatory message) would be appropriate.
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.