[pkg-nvidia-devel] nvidia-graphics-drivers* are ready for upload

Russ Allbery rra at debian.org
Sat Jul 17 22:48:18 UTC 2010


Andreas Beckmann <debian at abeckmann.de> writes:

> after some intensive piuparts tests for upgrading from and cleaning up
> after several old versions (found on snapshot.d.o), I think the new
> nvidia-graphics-drivers{,-legacy-{173,96,71}xx} packages are ready for
> upload. They will all have to go through NEW because of the introduction
> of libgl1-nvidia{,legacy-{71,96,173}xx}-{glx,glx-ia32,dev}

I'm afraid the upgrade from the current versions to the new
nvidia-graphics-drivers doesn't work.  This happens:

Selecting previously deselected package libgl1-nvidia-glx.
dpkg: considering removing nvidia-glx in favour of libgl1-nvidia-glx ...
dpkg: yes, will remove nvidia-glx in favour of libgl1-nvidia-glx.
Unpacking libgl1-nvidia-glx (from libgl1-nvidia-glx_195.36.31-1_i386.deb) ...
Removing /usr/lib/libGL.so symlink from unknown origin.
Removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/nvidia/libGL.so.1.2.xlibmesa by nvidia-glx'
Removing `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/libGL.so.1.xlibmesa by nvidia-glx'
Moving /usr/lib/nvidia/libGL.so.1.xlibmesa to /usr/lib/nvidia/diversions/libGL.so.1
Adding `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-glx'
Removing `diversion of /usr/lib/libGL.so to /usr/lib/nvidia/libGL.so.xlibmesa by nvidia-glx'
Adding `diversion of /usr/lib/libGL.so to /usr/lib/nvidia/diversions/libGL.so by libgl1-nvidia-glx'
Leaving `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-glx'
Adding `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/nvidia/diversions/libGL.so.1.2 by libgl1-nvidia-glx'
dpkg-divert: mismatch on divert-to
  when removing `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/libGL.so.1.xlibmesa by nvidia-glx'
  found `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-glx'
dpkg: error processing libgl1-nvidia-glx_195.36.31-1_i386.deb (--install):
 subprocess installed post-removal script returned error exit status 2
Selecting previously deselected package libnvidia-compiler.
dpkg: considering removing libnvidia-compiler1 in favour of libnvidia-compiler ...
dpkg: yes, will remove libnvidia-compiler1 in favour of libnvidia-compiler.
Unpacking libnvidia-compiler (from libnvidia-compiler_195.36.31-1_i386.deb) ...
dpkg-divert: mismatch on divert-to
  when removing `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/libGL.so.1.xlibmesa by nvidia-glx'
  found `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-glx'
dpkg: error processing libnvidia-compiler_195.36.31-1_i386.deb (--install):
 subprocess installed post-removal script returned error exit status 2
Selecting previously deselected package nvidia-glx-dev.
Unpacking nvidia-glx-dev (from nvidia-glx-dev_195.36.31-1_i386.deb) ...
dpkg-divert: mismatch on divert-to
  when removing `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/libGL.so.1.xlibmesa by nvidia-glx'
  found `diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-glx'
dpkg: error processing nvidia-glx-dev_195.36.31-1_i386.deb (--install):
 subprocess installed post-removal script returned error exit status 2
Preparing to replace nvidia-glx 195.36.24-4 (using nvidia-glx_195.36.31-1_i386.deb) ...
Removing `diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/nvidia/libglx.so.xlibmesa by nvidia-glx'
Moving /usr/lib/nvidia/libglx.so.xlibmesa to /usr/lib/nvidia/diversions/libglx.so
Adding `diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/nvidia/diversions/libglx.so by nvidia-glx'
Leaving `diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/nvidia/diversions/libglx.so by nvidia-glx'
Unpacking replacement nvidia-glx ...
Removing `diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/nvidia/diversions/libglx.so by nvidia-glx'

The problem is that the calling sequence of maintainer scripts in a
conflict situation is as follows:

    old-package prerm deconfigure
    old-package prerm remove
    new-package preinst install
    <unpack>
    <remove old files>
    old-package postrm remove
    new-package postinst configure

The diversions are therefore taken over in the preinst stage, and then the
postrm of the old nvidia-glx runs and fails because the diversion has
changed out from under it.

You probably won't see this case normally with aptitude because aptitude
probably tries to upgrade nvidia-glx first rather than removing it and
then reinstalling it, but it's apparent when testing an upgrade with dpkg
directly.

I think we can't change the diversions and change which package manages
them at the same time.  If nvidia-glx still owned the diversions,
everything would work properly because the old nvidia-glx postrm would
never be called.  Can we leave the diversions in the nvidia-glx package
for the next upload and then move them in a subsequent upload?

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



More information about the Pkg-nvidia-devel mailing list