[RFC] Skipping new-prerm failed-upgrade?
to better understand this mail you can refer to this diagram
During an upgrade from V1 to V2, if "V1->prerm upgrade V2" fails, dpkg tries
to run "V2->prerm failed-upgrade V1" and if it works the upgrade
This is very practical if V1 had a bug in its prerm script, it can be
worked around with some specific code in V2 and let the upgrade continue
Now there are cases where we really want to stop the upgrade from the
prerm. We have the case with dpkg where don't want to allow a downgrade
if we have packages that rely on a dpkg feature that the target version
does not support. For now it works because we did not have any prerm
in the old versions but as soon as you have a prerm you're screwed because
in general the scripts always "exit 0" for the failed-upgrade case.
I would thus like to discuss 2 ideas:
1/ I'd argue that in the case of downgrade, dpkg should not try to run
the failed-upgrade fallback because there's no way the oldest version
can be aware of how to work-around a problem in a prerm script of a
newer version that did not exist at the time the oldest prerm was
Suggested patch attached. Do you agree with this? Do you see possible
problems with this?
2/ It would be nice to have a way for the prerm script to explicitly
disable the fallback. Maybe we could define a special exit code that
the "prerm upgrade" can use to tell dpkg to not consider the fallback.
Or do you see another way for the script to indicate this to dpkg?
If the exit code approach makes sense, what exit code could we use for
Raphaël Hertzog ◈ Debian Developer
Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)