Processed: Re: Bug#428507: dpkg: The error in package upgrading if the old version contains symlinks.

2007-06-12 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> severity 428507 normal
Bug#428507: dpkg: The error in package upgrading if the old version contains  
symlinks.
Severity set to `normal' from `grave'

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#428507: dpkg: The error in package upgrading if the old version contains symlinks.

2007-06-12 Thread Raphael Hertzog
severity 428507 normal
thanks

On Tue, 12 Jun 2007, Dmitry E. Oboukhov wrote:
> Package: dpkg
> Version: 1.13.25
> Severity: grave

Please don't inflate the severity without good reasons.

> 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.

I'll let the dpkg maintainer close this bug (or merge it if he prefers, of
tag wontfix).

The bug that the symlink doesn't not replace the directory is already
documented in #182747. #406715 is another variant where the symlink is
silently ignored when a pre-existing directory is there (although in that
case it concerns two different packages).

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/




Bug#428507: dpkg: The error in package upgrading if the old version contains symlinks.

2007-06-12 Thread Dmitry E. Oboukhov
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   root4 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   root4 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   root4 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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]