Fix nvidia-like ports, help needed

Baptiste Daroussin bapt at
Wed Feb 22 22:26:00 UTC 2012

Hi all,

this mail is also sent to ports@ has the problem we have with nvidia-driver
might also occur elsewhere and we need a general fix for that.

First what is the failure: nvidia driver overwrite provided by another
package which is broken by design because the package database isn't consistent
anymore. however this nvidia-driver needs to replace

In that case we definitely need to have a tool allowing us to safely provide and switch between the mesa one and the nvidia one.

currently this kind of bugs silently occurs with pkg_install, but pkgng is more
strict about that and refuses it.

We then need a tool like gentoo's eselect, redhat alternative and I don't
remember the name for debian.

We need it the FreeBSD way, not sure we need something as complex as what the
linux distribution does, maybe yes.

I wrote a quick and dirty script named alternative:

That get informations about the alternatives in ${LOCALBASE}/etc/alternative.d


current behing a symlink to either nvidia or mesa

DESCRIPTION="Default OpenGL library"

cat mesa/
DESCRIPTION="libGL provided by the mesa project"

cat nvidia/
DESCRIPTION="libGL provided by the nvidia driver"

with that nvidia could have and mesa

the script alternative might change the symlink to point on nvidia or
mesa depending on the user choices.

this script is just an idea definitly not an implementation.

nvidia case is just an example but the script should try to be more general.
(handle binaries scripts etc.)

I don't have time to work on this currently hope someone will takle this task.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list