#1067155 debian-policy: prerm scripts cannot actually rely on dependencies

#1067155#5
Date:
2024-03-19 12:02:53 UTC
From:
To:
Package: debian-policy
Severity: wishlist
X-Debbugs-Cc: deity@lists.debian.org, debian-dpkg@lists.debian.org

APT's installation planner does not consider dependencies of packages
being scheduled for removal, so a prerm must fail equally gracefully
as a postrm does in absence of its dependencies.

This does break dpkg's assumptions which it happily tells you about,
but this is the reality we live in.

So e.g. one thing you see is that apt removes libapt-pkg6.0, then
unpacks libapt-pkg6.0t64, then removes libapt-pkg6.0 reverse
dependencies.

Clearly APT should be considering dependencies when removing packages
but even in that case, removals may sometimes need to be forced in the
wrong order because any order leads to broken dependencies, so still,
prerms should not rely on dependencies, but only on essential packages.

#1067155#10
Date:
2024-03-23 04:07:00 UTC
From:
To:
Hello,

I'm not sure that Policy is the place to discuss a change proposal like
this, and we can't render a swathe of packages RC buggy by making such a
change here.  The archive would need to change first.