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

Re: Packages removing alternatives on upgrade

tony mancill <tmancill@debian.org> writes:
> On 09/23/2012 08:40 AM, Ivan Shmakov wrote:

>> 	BTW, do I understand it correctly that it's just a matter of
>> 	dropping the ‘upgrade’ case from .prerm?  (Possible patch
>> 	MIME'd.)


>> --- debian/elvis-tools.prerm.~1~	2012-09-23 13:34:49.000000000 +0000
>> +++ debian/elvis-tools.prerm	2012-09-23 15:24:02.000000000 +0000
>> @@ -3,7 +3,7 @@
>>  set -e
>>  case "$1" in
>> -    upgrade|remove|deconfigure)
>> +    remove|deconfigure)
>>          update-alternatives --quiet --remove ctags /usr/bin/elvtags
>>          ;;
>>      failed-upgrade)

> Can someone confirm that Ivan's proposed patch is the correct way to
> deal with this problem?  I have the same issue in some of my packages.

It's an improvement.  Guillem makes a good argument that you should drop
deconfigure as well, which means that:

if [ "$1" = "remove" ] ; then
    update-alternatives --remove <foo> <path-to-foo>

is probably the best thing to use right now.  See:


near the bottom for more discussion.  (Note that while common, I've never
been fond of that case statement construction, since it means that we
can't introduce new maintainer script actions without modifying lots of
maintainer scripts that may not need to be modified otherwise.)

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

Reply to: