Your message dated Thu, 9 Aug 2007 16:03:00 +0300
with message-id <[EMAIL PROTECTED]>
and subject line Bug#428507: dpkg: The error in package upgrading if the old
version contains symlinks.
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: dpkg
Version: 1.13.25
Severity: grave
If the old version of the package contains symlink, and the new version
tries to save a directory into the same place, then an upgrade won't be
correct.
example:
nb:[/root/temp]# ls
nb:[/root/temp]# export LANG=en_US.UTF-8
nb:[/root/temp]# mkdir 1 2 2/test-dir
nb:[/root/temp]# ln -s /bin 1/test-dir
nb:[/root/temp]# for i in 1 2; do cd $i && tar -czf ../packet-$i.tgz . && cd
..; done
nb:[/root/temp]# alien -kd packet-1.tgz && alien -kd packet-2.tgz
packet_1-1_all.deb generated
packet_2-1_all.deb generated
nb:[/root/temp]# dpkg -c packet_1-1_all.deb
drwxr-xr-x root/root 0 2007-06-12 13:19 ./
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/doc/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/doc/packet/
-rw-r--r-- root/root 236 2007-06-12 13:19 ./usr/share/doc/packet/copyright
-rw-r--r-- root/root 175 2007-06-12 13:19
./usr/share/doc/packet/changelog.Debian.gz
lrwxrwxrwx root/root 0 2007-06-12 13:19 ./test-dir -> /bin
nb:[/root/temp]# dpkg -c packet_2-1_all.deb
drwxr-xr-x root/root 0 2007-06-12 13:19 ./
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/doc/
drwxr-xr-x root/root 0 2007-06-12 13:19 ./usr/share/doc/packet/
-rw-r--r-- root/root 236 2007-06-12 13:19 ./usr/share/doc/packet/copyright
-rw-r--r-- root/root 175 2007-06-12 13:19
./usr/share/doc/packet/changelog.Debian.gz
drwxrwx--- root/root 0 2007-06-12 13:18 ./test-dir/
nb:[/root/temp]# dpkg -i packet_1-1_all.deb
Selecting previously deselected package packet.
(Reading database ... 128644 files and directories currently installed.)
Unpacking packet (from packet_1-1_all.deb) ...
Setting up packet (1-1) ...
nb:[/root/temp]# ls -l /|grep test-dir
lrwxrwxrwx 1 root root 4 2007-06-12 13:20 test-dir -> /bin
nb:[/root/temp]# dpkg -i packet_2-1_all.deb
(Reading database ... 128648 files and directories currently installed.)
Preparing to replace packet 1-1 (using packet_2-1_all.deb) ...
Unpacking replacement packet ...
Setting up packet (2-1) ...
nb:[/root/temp]# ls -l /|grep test-dir
lrwxrwxrwx 1 root root 4 2007-06-12 13:20 test-dir -> /bin
nb:[/root/temp]# dpkg --remove packet
(Reading database ... 128643 files and directories currently installed.)
Removing packet ...
nb:[/root/temp]# ls -l /|grep test-dir
nb:[/root/temp]# dpkg -i packet_2-1_all.deb
Selecting previously deselected package packet.
(Reading database ... 128644 files and directories currently installed.)
Unpacking packet (from packet_2-1_all.deb) ...
Setting up packet (2-1) ...
nb:[/root/temp]# ls -l /|grep test-dir
drwxrwx--- 2 root root 4096 2007-06-12 13:18 test-dir
nb:[/root/temp]# dpkg -i packet_1-1_all.deb
dpkg - warning: downgrading packet from 2-1 to 1-1.
(Reading database ... 128648 files and directories currently installed.)
Preparing to replace packet 2-1 (using packet_1-1_all.deb) ...
Unpacking replacement packet ...
Setting up packet (1-1) ...
nb:[/root/temp]# ls -l /|grep test-dir
drwxrwx--- 2 root root 4096 2007-06-12 13:18 test-dir
nb:[/root/temp]# dpkg --remove packet
(Reading database ... 128643 files and directories currently installed.)
Removing packet ...
nb:[/root/temp]# dpkg -i packet_1-1_all.deb
Selecting previously deselected package packet.
(Reading database ... 128644 files and directories currently installed.)
Unpacking packet (from packet_1-1_all.deb) ...
Setting up packet (1-1) ...
nb:[/root/temp]# ls -l /|grep test-dir
lrwxrwxrwx 1 root root 4 2007-06-12 13:25 test-dir -> /bin
nb:[/root/temp]# dpkg --remove packet
(Reading database ... 128643 files and directories currently installed.)
Removing packet ...
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.20.4dimka
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dpkg depends on:
ii coreutils 5.97-5.3 The GNU core utilities
ii libc6 2.5-9+b1 GNU C Library: Shared libraries
dpkg recommends no packages.
-- debconf-show failed
--- End Message ---
--- Begin Message ---
On Tue, 2007-06-12 at 12:40:18 +0200, Raphael Hertzog wrote:
> On Tue, 12 Jun 2007, Dmitry E. Oboukhov wrote:
> > If the old version of the package contains symlink, and the new version
> > tries to save a directory into the same place, then an upgrade won't be
> > correct.
>
> This has always been the case and it's not a bug but a feature. It's that
> way so that the local admin can effectively move a sub-directory somewhere
> else (where he has more spaces for example) and replace the directory with
> a symlink.
>
> If the package really wants to replace a symlink, it has to remove the
> symlink in the preinst script. This behaviour is documented in the
> Debian Policy:
> http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
>
> | A directory will never be replaced by a symbolic link to a directory or
> | vice versa; instead, the existing state (symlink or not) will be left
> | alone and dpkg will follow the symlink if there is one.
Right, closing.
regards,
guillem
--- End Message ---