Bug#632369: dpkg-divert: error: rename involves overwriting file, different file, not allowed

Andreas Beckmann debian at abeckmann.de
Sat Jul 2 15:49:45 UTC 2011


On 2011-07-02 16:49, Robin wrote:
> term.log.1.gz sent same time and appears to show up on bug log?

Sorry, missed that as it was not displayed inline due to compression ...
Let's see what happened:

Removing libgl1-mesa-glx ...
Purging configuration files for libgl1-mesa-glx ...
Processing triggers for man-db ...
Selecting previously deselected package libgl1-mesa-swx11.
Unpacking libgl1-mesa-swx11 (from .../libgl1-mesa-swx11_7.10.3-3_i386.deb) ...
Setting up libosmesa6 (7.10.3-3) ...
Setting up libgl1-mesa-swx11 (7.10.3-3) ...

You installed libgl1-mesa-swx11 inbetween which does not work well with 
the diversions, in glx-diversions 0.1.3 there is a conflicts with this 
package.

Selecting previously deselected package fglrx-driver.
Unpacking fglrx-driver (from .../fglrx-driver_1%3a11-4-2_i386.deb) ...
Adding 'diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/fglrx/diversions/libglx.so by fglrx-driver'

OK.

Selecting previously deselected package glx-diversions.
Unpacking glx-diversions (from .../glx-diversions_0.1_i386.deb) ...
...
Setting up glx-diversions (0.1) ...
Removing 'diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/diversions/libGL.so.1.2 by fglrx-glx'
Removing 'diversion of /usr/lib/libGL.so.1 to /usr/lib/fglrx/diversions/libGL.so.1 by fglrx-glx'
Removing 'diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/fglrx/diversions/libglx.so by fglrx-driver'
Moving /usr/lib/fglrx/diversions/libglx.so to /usr/lib/mesa-diverted/libglx.so
Adding 'diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/mesa-diverted/libglx.so by glx-diversions'
...

OK, as expected.

Removing diverted 'libGL.so.1' symlink with unexpected target.
Restoring diverted 'libGL.so.1' symlink.

Hmm, ... libgl1-mesa-swx11 caused this
 
Setting up fglrx-glx (1:11-4-2) ...
Processing triggers for glx-alternative-mesa ...
update-alternatives: using /usr/lib/mesa-diverted to provide /usr/lib/glx (glx) in auto mode.
update-alternatives: warning: not replacing /usr/lib/xorg/modules/extensions/libglx.so with a link.
Setting up glx-alternative-fglrx (0.1) ...
Processing triggers for menu ...
Processing triggers for glx-alternative-mesa ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/mesa-diverted because link group glx is broken.
update-alternatives: warning: not replacing /usr/lib/xorg/modules/extensions/libglx.so with a link.

As expected, but actually it should not have worked. Breaks were 
incorrectly versioned, otherwise glx-diversions would not have been 
installable with fglrx-* 1:11-4-*
Also the wrong package was triggered, so fglrx was not activated. 
(fixed in 0.1.2)

Preparing to replace fglrx-driver 1:11-4-2 (using .../fglrx-driver_1%3a11-4-2_i386.deb) ...
dpkg-divert: error: `diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/fglrx/diversions/libglx.so by fglrx-driver' clashes with `diversion of /usr/lib/xorg/modules/extensions/l
ibglx.so to /usr/lib/mesa-diverted/libglx.so by glx-diversions'
dpkg: error processing /var/cache/apt/archives/fglrx-driver_1%3a11-4-2_i386.deb (--unpack):

Now thing probably got hairy by reinstalling fglrx-driver 1:11-4-2
No longer possible with correctly versioned Breaks:.

Removing glx-diversions ...
Removing 'diversion of /usr/lib/libGL.so.1.2 to /usr/lib/mesa-diverted/libGL.so.1.2 by glx-diversions'
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1.2 to /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 by glx-diversions'
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1.2 to /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2 by glx-diversions'
Removing 'diversion of /usr/lib/libGL.so.1 to /usr/lib/mesa-diverted/libGL.so.1 by glx-diversions'
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1 by glx-diversions'
dpkg-divert: error: rename involves overwriting `/usr/lib/i386-linux-gnu/libGL.so.1' with
  different file `/usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1', not allowed
dpkg: error processing glx-diversions (--remove):

And this failed due to libgl1-mesa-swx11 being installed, see above.

Stopping reading the log here. Should work on new installations of  
0.1.3 without problems. I'll try to reproduce the problem with 
libgl1-mesa-swx11 and 0.1.2 and see if upgrades to 0.1.3 work smoothly.


> This is a new installation as of 24/06/11.
> UnInstalled as system is unstable with partial fglrx etc.installed.
> The first attempt to install left  Xoeg not working and the
> glx-deversions* packages (0.1.1?) refused to be uninstalled, including
>   trying to force. In the end I moved the diversion files from /var
> for those packages. Not sure what was happening at that point so used
> aptitude to completely remove Xorg and start again.

So with the diversions records removed from /var you end up with the 
file system modifications still remaining. Reinstalling xorg etc. 
brings back missing files, but duplicate ones are still around, e.g. in 
/usr/lib/mesa-diversions. These will have to be deleted manually, too. 
The package will not mess with such "conflicting" files where it can't 
find a origin and fail configuration. Due to a small typo ('>2' instead 
of '>&2') one error message will end up in a file called '2' instead of 
stderr. So in case the configuration fails without error message, check 
there.

>> Did you run reportbug from the machine where glx-diversions was
>> installed (but failed to configure)? I'm missing the output from the bug
...
> Yes but will try to install pkgs in a short while .
> 
> Do you want to close  632369 and I'll open a new bug report?

No, just provide a followup to this one using reportbug.


Andreas





More information about the pkg-nvidia-devel mailing list