Differences between revisions 7 and 8
Revision 7 as of 2012-11-27 01:04:35
Size: 788
Editor: PaulWise
Comment: interwiki
Revision 8 as of 2013-02-22 23:00:55
Size: 1255
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
In case you did replace a symlink with a directory in version 1,
but are adding the preinst script a posteriori in version 3,
a system with version 2 may still contain a symlink
(because dpkg did ignore your changes in a normal upgrade path)
or not
(because the user did try version 3 then downgrade).
You should then remove any existing symlink, whatever the upgraded version,
as done
[[https://lists.debian.org/debian-release/2013/01/msg01111.html|here]].

This page is meant to describe how to address the problem "missing copyright file" as meant here. The cause is that dpkg refuses to replace a directory with a symlink or vice versa (this behaviour is wanted for unrelated reasons).

Here is a possible solution, creating the symbolic link during migration in a postinst script.

The other obvious solution is not to use symlinks at all. Symbolic links created by any previous version must then be removed by a preinst script, as done here. In case you did replace a symlink with a directory in version 1, but are adding the preinst script a posteriori in version 3, a system with version 2 may still contain a symlink (because dpkg did ignore your changes in a normal upgrade path) or not (because the user did try version 3 then downgrade). You should then remove any existing symlink, whatever the upgraded version, as done here.