[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#71621: Policy on update-alternatives still needed



Jakub Wilk <jwilk@debian.org> writes:

> I don't think we should be filing bugs before there's consensus _how_
> exactly to fix them.

In prerm:

if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
    update-alternatives --remove tf /usr/bin/tf5
fi

is correct I think.  The possible invocations of prerm are:

prerm remove
old-prerm upgrade new-version
conflictor's-prerm remove in-favour package new-version
deconfigured's-prerm deconfigure in-favour package-being-installed version
  [removing conflicting-package version]
new-prerm failed-upgrade old-version

We do want to remove the alternative for all the remove cases, and we
don't for the upgrade case.  The deconfigure case is used with Breaks,
where we would want to remove the alternative (since the package is
broken).  That leaves failed-upgrade, where we're either about to do an
upgrade (and hence will call postinst again and would just recreate the
alternative) or we're about to call abort-upgrade in postinst.

As near as I can tell, postinst should just unconditionally call
update-alternatives; it's at worse a no-op.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: