Package: dpkg
Version: 1.13.25
Severity: normal

Hi,

when I have a package which contains a symlink to a conffile which is
in turn marked as a conffile itself, dpkg creates a package that does
not install if the link file does already exist:

$ ls -al /etc/link* /etc/target*
ls: /etc/link*: No such file or directory
ls: /etc/target*: No such file or directory
$ echo "this is the contents of the link file in the file system" | sudo tee 
/etc/link
this is the contents of the link file in the file system
$ cat debian/target
this is the target file from the package
$ cat debian/conffiles
etc/link
$ cat debian/links
etc/target etc/link

$ cat debian/install
debian/target etc
$ # <build package>
$ sudo dpkg --install ../*.deb
Selecting previously deselected package hello-debhelper.
(Reading database ... 23189 files and directories currently installed.)
Unpacking hello-debhelper (from .../hello-debhelper_2.2-2_i386.deb) ...
Preparing to replace hello-debhelper 2.2-2 (using 
.../hello-debhelper_2.2-3_i386.deb) ...
Unpacking replacement hello-debhelper ...
Setting up hello-debhelper (2.2-3) ...
dpkg: error processing hello-debhelper (--install):
 unable to change ownership of new dist conffile `/etc/link.dpkg-new': No such 
file or directory
Errors were encountered while processing:
 hello-debhelper
$ ls -al /etc/link* /etc/target*
-rw-r--r-- 1 root root 57 Apr 28 08:59 /etc/link
lrwxrwxrwx 1 root root  6 Apr 28 09:00 /etc/link.dpkg-new -> target
-rw-r--r-- 1 root root 41 Apr 28 08:49 /etc/target.dpkg-new
$

A .diff.gz for the modified hello-debhelper package is attached so
that you can reproduce the issue.

If symlink conffiles are not allowed (I didn't find any clause in
Policy forbidding this), dpkg should not build the package. But, of
course, it would be great if the symlink itself (not the file being
pointed to) would be handled as conffile. This would greatly ease
providing transition links, and prevent bugs like #420528 from
happening.

Greetings
Marc

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

Kernel: Linux 2.6.21-zgsrv (SMP w/1 CPU core; PREEMPT)
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                     5.97-5.3   The GNU core utilities
ii  libc6                         2.5-4      GNU C Library: Shared libraries

dpkg recommends no packages.

-- no debconf information


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

Reply via email to