[Pkg-utopia-maintainers] Bug#1099086: might be less verbose in calling adduser
Simon McVittie
smcv at debian.org
Sun Mar 9 15:34:34 GMT 2025
On Sun, 09 Mar 2025 at 15:20:35 +0100, Marc Haber wrote:
>I haven't really thought about those upgrading
>things, but I took from this discussion that preinst and postinst
>scripts are likely to run with pre-upgrader versions of adduser.
>That's a real pity since it will slow down Debian's speed to simplify
>maintainer scripts but that's just the way things are.
It is not that postinst scripts are *likely* to run with the old version
of adduser, so much as that postinst scripts are required to assume that
they *might* run with the old version of adduser, unless the package
explicitly has a versioned Depends on the new version of adduser. I
think a versioned Depends would be fine for packages higher up the
dependency stack (for instance in something like gnome-remote-desktop or
openarena-server I wouldn't hesitate to add one), but every time we
tighten a dependency lower down the stack, we give apt tighter
constraints to work with, which increases the probability that apt will
be unable to find a solution (either because no solution exists, or
because its heuristics can't find a solution in a reasonable timeframe).
Similary preinst scripts must assume that they might run with the old
version of adduser, unless the package has a *Pre-Depends* on the new
adduser - and Pre-Depends are definitely not something to deploy
lightly, because they put very significant constraints on what solutions
apt is allowed to propose.
If we have to defer some maintainer script simplifications until forky,
that's certainly not the worst thing: better that than not being able to
apply those simplifications at all! I'm grateful that you have been
teaching adduser to do the right thing by default, like making --system
imply --home=/nonexistent, making it never "helpfully" create
/nonexistent as a home directory, and making --system imply enough of
--quiet that maintainer scripts probably no longer need --quiet in
future. Those are all good directions.
smcv
More information about the Pkg-utopia-maintainers
mailing list