Hi!

As a person who "faced the issue for several times across these years" I can only add
that that most important is fresh installatoin. As far as I can see, the original patch is enough
to solve the problem. So, LGTM.

P.S. I won't comment other parts of discussion because they're beyond my understanding of deb scripts.


On Fri, 5 Jun 2020 at 09:55, Alexander Turenko <alexander.turenko@tarantool.org> wrote:
> Long story short: comparing both approaches I personally prefer to apply
> the one from the origin patch and take some changes you provided below
> (e.g. empty <enabled> directory handling).
>
> I also Cced Yaroslav as the person who faced the issue "for several
> times across these years".

I don't mind any of these approaches. I don't know which one would be
better. So I would say that I have no preference for one over another.

> AFAICS, there are some files left on the system after this "migration"
> that are not tracked by the package. So they are not removed anymore
> even after the package is deinstalled.

They will not be removed at `apt-get remove`, but will be at `apt-get
purge` as well as everything in /etc/tarantool. See:

 | $ cat debian/tarantool-common.postrm
 | #!/bin/sh
 |
 | set -e
 |
 | case "$1" in
 |     purge)
 |         rm -fr  \
 |             /etc/tarantool \
 |             /var/log/tarantool \
 |             /var/run/tarantool \
 |             /var/lib/tarantool
 |     ;;
 | esac
 |
 | #DEBHELPER#


--
С уважением. 
Дынников Ярослав.