Hi Osamu,

On Sun, Apr 27, 2025 at 07:01:44PM +0900, Osamu Aoki wrote:
> Since you seem to be very knowlegeable, I have a question:
> 
> Isn't the APT system smart enough to run all preinst scripts of all downloaded
> packages?

apt is only half the story. In principle, you may perform upgrades with
dselect or dpkg directly. It just so happens that everyone uses apt. Now
apt instructs dpkg to do its thing, but subtle changes in dependencies
may instruct apt to order its instructions differently. Ultimately, what
needs to happen here is making valid dpkg interactions work.

Generally, dpkg may choose to unpack debian-reference-$LANG before
unpacking debian-reference-common even though it may only configure
debian-reference-$LANG after having configured debian-reference-common.
In particular, debian-reference-$LANG may be unpacked before running
debian-reference-common.preinst. I see how that is not desirable. We
would like to tell apt and dpkg to always unpack debian-reference-common
before unpacking debian-reference-$LANG. The way to do that is declaring
suitable Conflicts or better Pre-Depends.

I argue that debian-reference-$LANG should really declare:

    Depends: debian-reference-common (= ${source:Version})
    Pre-Depends: debian-reference-common (>= 2.109~)

Helmut

Reply via email to