Bug#486446: vim-runtime: dpkg-divert noise on upgrade

Sven Joachim svenjoac at gmx.de
Mon Jun 16 06:29:22 UTC 2008


Package: vim-runtime
Version: 1:7.1.314-2
Severity: normal
Tags: patch

Your package produces noise when it is upgraded/reinstalled:

,----
| # aptitude reinstall vim-runtime
| [...]
| (Reading database ... 138126 files and directories currently installed.)
| Preparing to replace vim-runtime 1:7.1.314-2 (using .../vim-runtime_1%3a7.1.314-2_all.deb) ...
| Leaving `diversion of /usr/share/vim/vim71/doc/help.txt to /usr/share/vim/vim71/doc/help.txt.vim-tiny by vim-runtime'
| Leaving `diversion of /usr/share/vim/vim71/doc/tags to /usr/share/vim/vim71/doc/tags.vim-tiny by vim-runtime'
| Unpacking replacement vim-runtime ...
| Removing `diversion of /usr/share/vim/vim71/doc/help.txt to /usr/share/vim/vim71/doc/help.txt.vim-tiny by vim-runtime'
| dpkg-divert: rename involves overwriting `/usr/share/vim/vim71/doc/help.txt' with
|   different file `/usr/share/vim/vim71/doc/help.txt.vim-tiny', not allowed
| Removing `diversion of /usr/share/vim/vim71/doc/tags to /usr/share/vim/vim71/doc/tags.vim-tiny by vim-runtime'
| dpkg-divert: rename involves overwriting `/usr/share/vim/vim71/doc/tags' with
|   different file `/usr/share/vim/vim71/doc/tags.vim-tiny', not allowed
| Processing triggers for man-db ...
| Setting up vim-runtime (1:7.1.314-2) ...
| Processing /usr/share/vim/addons/doc
`----

The problem is that the postrm script runs the
handhold_diversion_removal function unconditionally, thus producing the
dpkg-divert error messages.  It should only do this if the package is
being removed, not when it is upgraded.  The following patch takes care
of that:

--8<---------------cut here---------------start------------->8---
--- vim-runtime.postrm~	2008-06-15 19:00:57.000000000 +0200
+++ vim-runtime.postrm	2008-06-16 08:23:07.000000000 +0200
@@ -29,7 +29,10 @@
 }
 
 rm -f /usr/share/vim/addons/doc/tags
-handhold_diversion_removal
+if [ "$1" = remove ]
+then
+    handhold_diversion_removal
+fi
 
 

--8<---------------cut here---------------end--------------->8---


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25.6
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim                          1:7.1.314-2 Vi IMproved - enhanced vi editor
ii  vim-tiny                     1:7.1.314-2 Vi IMproved - enhanced vi editor -

-- no debconf information





More information about the pkg-vim-maintainers mailing list