[pkg-nvidia-devel] Moving diversions between packages

Russ Allbery rra at debian.org
Sun Aug 15 22:34:47 UTC 2010


Andreas Beckmann <debian at abeckmann.de> writes:

> I now implemented the following:

> libgl1-nvidia-glx ships its libGL.so.* in /usr/lib/nvidia/ instead of
> usr/lib/. In the postinst (hopefully this fixes the corner case upgrade
> problems, I couldn't reproduce them) the libGL.so.* from libgl1-mesa-glx
> in /usr/lib is diverted to /usr/lib/nvidia/diversions. Diverting late is
> now possible since we don't have file conflicts with shipped files. The
> preinst wrong-upgrade-order check has been removed.  Afterwards I setup
> some alternatives to provide libGL.so.1 (there are two possibilities:
> /usr/lib/nvidia/libGL.so.1 with priority 42 (we could use the major
> version but since we don't allow more than one version to be installed
> at the same time this does not really matter) and
> /usr/lib/nvidia/diversions/libGL.so.1 with priority 5). This would
> actually allow the user to have nvidia-glx installed and still use the
> mesa libGL.so.1 by manually reconfiguring the alternatives. Since
> libgl1-mesa-glx is not required to be installed, this second alternative
> is controlled by a trigger. Similarily the trigger that updates
> /usr/lib/libGL.so now handles this as an alternative, too. I do not
> consider /usr/lib/nvidia/libGL.so from libgl1-nvidia-dev as a valid
> alternative to provide libGL.so since we want to discourage linking with
> libGL.so* from NVIDIA when compiling.  Similar things are done for
> libgl1-nvidia-glx-ia32 (but without triggers because we depend on
> ia32-libs with carries mesa's libGL.so*).

> If this approach works, we might consider a joint effort with the
> maintainers of libgl1-mesa* and fglrx to simplify the libgl1 diverting
> mess by switching to alternatives in all providers of libGL.so*.

Still fails, unfortunately.  I'm looking at it now.

Setting up libgl1-nvidia-glx (195.36.31-1) ...
Adding `diversion of /usr/lib/libGL.so to /usr/lib/nvidia/diversions/libGL.so by libgl1-nvidia-glx'
dpkg-divert: error checking `/usr/lib/nvidia/diversions/libGL.so': No such file or directory
dpkg: error processing libgl1-nvidia-glx (--install):
 subprocess installed post-installation script returned error exit status 2
Setting up libnvidia-compiler (195.36.31-1) ...
dpkg: error processing nvidia-glx (--install):
 package nvidia-glx is not ready for configuration
 cannot configure (current status `config-files')

> Open question: does the shlibs system work properly and generate the
> correct dependencies when libraries are provided via alternatives?

It doesn't itself have any knowledge of alternatives; it just looks at
what libraries are loaded by the package and uses the corresponding shlibs
file.  I believe it assumes there are not two packages providing the same
library.

-- 
Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>



More information about the Pkg-nvidia-devel mailing list