Package: dpkg
Version: 1.14.22
Followup-For: Bug #406715

Hi,

the same problem happens, when a directory is replaced by a symlink
during the upgrade of a package. I am attaching 2 versions of the
testpackage tp to illustrate the problem. Version 1 ships the file
/usr/lib/tp/tp.cfg and the directory /usr/lib/tp/log. Version 2 moves
tp.cfg to /etc and the directory to /var/log/tp and ships appropriate
symlinks in /usr/lib/tp/. After the installation of version 1 we have:

$ ls -l /usr/lib/tp
insgesamt 4
drwxr-xr-x 2 twerner twerner 4096 12. Okt 15:51 log
-rw-r--r-- 1 twerner twerner    0 12. Okt 15:51 tp.cfg

After the upgrade to version 2 we have:

$ ls -l /usr/lib/tp
insgesamt 4
drwxr-xr-x 2 twerner twerner 4096 12. Okt 15:51 log
lrwxrwxrwx 1 twerner twerner   11 12. Okt 16:00 tp.cfg -> /etc/tp.cfg

After the installation of version 2 on a fresh system we have the
correct symlink:

$ ls -l /usr/lib/tp
insgesamt 0
lrwxrwxrwx 1 twerner twerner 11 12. Okt 16:00 log -> /var/log/tp
lrwxrwxrwx 1 twerner twerner 11 12. Okt 16:00 tp.cfg -> /etc/tp.cfg

The maintainer of tp can handle that problem via preinst but it is
difficult to spot because dpkg does not fail during the upgrade (no
warning either). Because I have seen RC bugs because of this (#468954) I
will increase the severity of this bug to important. IMHO dpkg should
fail is such cases with a useful error message.


Cheers,
Torsten


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (985, 'testing'), (88, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg depends on:
ii  coreutils                     6.10-6     The GNU core utilities
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  lzma                          4.43-14    Compression method of 7z format in

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                           0.7.14+b1  Advanced front-end for dpkg

-- no debconf information

Attachment: tp_1_all.deb
Description: application/debian-package

Attachment: tp_2_all.deb
Description: application/debian-package

Reply via email to