On Mon, 22 Oct 2018 17:49:39 +0200 Andreas Beckmann <a...@debian.org> wrote:
> This does not seem to be the typical dir_to_symlink problem.

It is. Just badly handled so that it became hard to recognize.

from emacs-nox.preinst:

doc_dir=/usr/share/doc/emacs-nox
case "$1" in
    install|upgrade)
        # Before the unversioning, emacs-{gtk,lucid,nox} packages were
        # in a different source package (emacs-defaults) and were arch
        # all, and dpkg can't handle dir to symlink transitions.
        rm -rf "$doc_dir"
        ;;

There is dpkg-maintscript-helper for this task.

You most likely want to drop the .preinst and create
emacs-nox.maintscript instead with this content (one line):

<<<<< 8< debian/emacs-nox.maintscript >>>>>
dir_to_symlink /usr/share/doc/emacs-nox emacs-common 1:25.2+1-12~
<<<<< >8 >>>>>

and do the same for -gtk and -lucid with adjusted paths.


Andreas

Reply via email to