Re: Dead-lock in replaced package scripts
On Tue, Nov 12, 2013, at 14:37, Tollef Fog Heen wrote:
> ]] Ondřej Surý
> > Now the "nsd" user has been removed in nsd3.postinst, but it is still
> > needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> > just cross the fingers and hope nobody would do such thing?
> As others have said: stop removing the user
I will, but the harm has been already done at the time I become the nsd*
> but also, rm the old postrm script (with suitable checks).
sed -i -e '/deluser --quiet nsd/ d' /var/lib/dpkg/info/nsd3.postrm
instead, but thanks for the hint. That helped me to break from
'/var/lib/dpkg/info is sacred' mindset.
> It's not pretty, but it's sometimes necessary.
On Tue, Nov 12, 2013, at 14:37, Raphael Hertzog wrote:
> You can check the status of the nsd3 package when you install/upgrade nsd
> and emit a warning pointing to some README.Debian that explains how to
> clean up the situation (or you can do it automatically, it's not very
> clean but should be rather straightforward).
> Or you can add a dependency on nsd3 (>= 4) to nsd for the time of a
> release cycle, thus forcing the user to keep a dummy package around.
That would create a dependency loop (since nsd3 needs to depend on nsd
> In any case, I would still fix the nsd package to not remove the user on
Already done in 4.0.0-3 (that is almost finished and waiting for a
solution for this).
Thanks to you both, this helped me to find the correct solution to
remedy the problem.
Ondřej Surý <email@example.com>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server