> Mark Purcell wrote: >> smstools (3.0.2-3) unstable; urgency=medium >> * Urgency medium as this clears a bug in the upgrade path: >> Added prerm script to handle upgrade from 3.0-1 to this version >> (Closes: #403615) > > --- smstools-3.0.2.orig/debian/prerm > +++ smstools-3.0.2/debian/prerm > @@ -0,0 +1,6 @@ > +#!/bin/sh > +set -e > + > +if ! "$1" = 'failed-upgrade'; then > + #DEBHELPER# > +fi > > This looks not right as it will try to execute $1, which will probably already > fail with an error message AFAICS... Ehhm. Why should that try to _execute_ $1 ? It does what it is supposed to do. It checks weither the parameter to debian/prerm is failed-upgrade or not. > I doubt this is tested, though feel free to prove me wrong :-) Well, you doubt, i tested it. So test it yourself, if you think that it is not tested, to get your prove that you are wrong. In fact it is like that: Upgrade fails because the init script of the old package is defect. So afair prerm/oldpackage fails, which forces prerm/new force-upgrade to be called. So all i have to do to not let it fail is: Do not call the init script in here. That is exactly what i do here. Well it is not as clean as it could be to evaluate #DEBHELPER# or not, but it does not cause any harm in this case, because i don't use anything except dh_installinit which would write something to #DEBHELPER#. Best Regards Patrick
Attachment:
signature.asc
Description: OpenPGP digital signature