Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517 - media-glx/nvidia (rewrite into nvidia-kernel and nvidia-glx)
Summary: media-glx/nvidia (rewrite into nvidia-kernel and nvidia-glx)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-03 22:56 UTC by Arcady Genkin
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arcady Genkin 2002-02-03 22:56:17 UTC
This is an overhaul of the nvidia portage.  Grab it from:

  http://cdf.toronto.edu/~agenkin/media-gfx.nvidia-new.tar.gz

BTW, is media-gfx the right place for it?  It's primarilly the X driver, so I 
think that these portages should go into x11-base or x11-misc.
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-02-03 23:03:16 UTC
Is there an advantage to having this split into 2 ebuilds?
Comment 2 Arcady Genkin 2002-02-03 23:19:20 UTC
I just wrote a message about this to gentoo-dev (see message 
<uobsf525o1.fsf@cdf.toronto.edu>).  IMO, yes.

Otherwise, when the latest versions of the kernel driver and the glx libraries 
differ (as they do now), which one determnines the version of the portage?  
Besides, updating the nvidia-kernel for a new Linux kernel does not require 
reinstall of the glx libraries.

There are other changes (like installing the GLX libraries into /opt/NVIDIA, 
and more), which I discussed in the above message.  Should I copy-paste into 
here?
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2002-02-03 23:21:32 UTC
No, I saw most of the other changes.  I was just curious on the splitting issue.
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-02-03 23:37:32 UTC
Here are all the problems with these ebuilds that I found.  Once fixed, I can
add these ebuilds to Portage to replace our current ebuild.

First, we're going to put them in "media-video".

In the kernel ebuild:

This: 
NV_KV="`readlink /usr/src/linux`"
if [ $? -ne 0 ]
then
        die "/usr/src/linux does not exist"
fi
NV_KV="${NV_KV/linux-/}"

...needs to be moved inside its own function and called by the src_*() functions
that need it.  This fixes another bug related to doing an emerge update on a
brand-new system.  Basically, we can't have the "readlink" run if the ebuild is
simply sourced.

This...
 [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
...should not be in src_install.  It should be in pkg_postinst() and only run
if $ROOT = "/"

The entire device node creation stuff should be completely removed from the
ebuild.  It is not necessary for devfs systems and writes outside of ${D} as well.

Remove from src_install and move to pkg_postinst (only if $ROOT = "/")
        [ -x /sbin/depmod ]   && /sbin/depmod -a
Remove altogether (not our policy to auto-load modules):
        [ -x /sbin/modprobe ] && /sbin/modprobe NVdriver

The glx ebuild:

Remove (done automatically by emerge and certainly not supposed to be in
src_install):
        [ -x /usr/sbin/env-update ] && /usr/sbin/env-update
        ldconfig

Change /opt/NVIDIA to /opt/nvidia

Using the 09nvidia script to precede X's libraries is a nice way to approach the
problem, though.  If you fix all the above-mentioned things I'll add these
ebuilds to Portage.


Comment 5 Arcady Genkin 2002-02-04 00:24:18 UTC
Daniel, thanks for the feedback.  I've updated the ebuilds as you 
suggested.  The new version is posted at:
  http://cdf.toronto.edu/~agenkin/media-video.nvidia-new.tar.gz

Regarding the device nodes...  How about the people that don't use devfs?  
Should we provide a script for them?  I've left the device-creation 
functions in the ebuild for now, but commented out invocation of 
nv_mk_dev_nodes function, so they are not used.  Perhaps we can detect 
whether devfs is used and create the nodes otherwise?

I tried creating the device entries in ${D}; it worked with installation, 
but not with unmerging. ;^)
Comment 6 Daniel Robbins (RETIRED) gentoo-dev 2002-02-04 00:33:54 UTC
We don't unmerge device nodes because it's a really bad thing to do.  This was a
concious design decision.  You'll need to remove all the device node creation
stuff from your ebuild.  Add a script to files/ and point the user to it in
pkg_postinst() if you want.
Comment 7 Arcady Genkin 2002-02-04 01:03:35 UTC
What would be a good destination directory for such script?  /usr/lib/nvidia/ ?
Comment 8 Daniel Robbins (RETIRED) gentoo-dev 2002-02-04 18:17:53 UTC
I think /opt/nvidia/bin would be good.
Comment 9 Daniel Robbins (RETIRED) gentoo-dev 2002-02-04 18:22:05 UTC
OK, your new ebuilds look really great.  If you want to submit a new version
that includes a device node-making script, I'll add these 2 ebuilds to cvs.
Comment 10 Arcady Genkin 2002-02-04 21:59:18 UTC
Okay, updated.  You can fetch them from:

  http://cdf.toronto.edu/~agenkin/media-video.nvidia-updated.tar.gz

Thanks for bearing with me. ;^)  I'll try to require less hand-holding the next
time.
Comment 11 Daniel Robbins (RETIRED) gentoo-dev 2002-02-04 22:15:43 UTC
OK, thanks Arcady!  I just added them to CVS.  Now, if you could do one more
thing.  Please write up some easy-to-understand and thorough instructions for
how people should install these new NVIDIA kernel/GLX packages, including
configuring XF86Config.  Then email these instructions to
gentoo-announce@gentoo.org and cc g2boojum@gentoo.org.  He will need to update
the Gentoo Linux Desktop Guide on our site.  Thanks for your great work!  The
NVIDIA drivers needed an overhaul and it looks like you've addressed all known
issues.  I'm now marking this bug as "FIXED".