Re: Packages removing alternatives on upgrade

2012-10-07 Thread Russ Allbery
Ivan Shmakov  writes:

>   ?  How is the ‘if’ statement above different to, say:

> case "$1" in
> (remove)
> update-alternatives --remove  
> ;;
> esac

It's not; what it *is* different from is the more common case
construction, which instead looks like:

case "$1" in
(remove)
update-alternatives --remove  
;;
(upgrade|failed-upgrade|deconfigure)
;;
(*)
echo "Unknown call $@" >&2
exit 1
;;
esac

If the case doesn't have that default case, it doesn't have this problem,
but when you see the case statement, you usually see that form.

-- 
Russ Allbery (r...@debian.org)   


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/877gr1a84e@windlord.stanford.edu



Re: Packages removing alternatives on upgrade

2012-10-07 Thread Ivan Shmakov
> Russ Allbery  writes:

[…]

 > 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  
 > fi

 > is probably the best thing to use right now.

[…]

 > (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.)

?  How is the ‘if’ statement above different to, say:

case "$1" in
(remove)
update-alternatives --remove  
;;
esac

-- 
FSF associate member #7257


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/86wqz1k2nb@gray.siamics.net



Re: Packages removing alternatives on upgrade

2012-10-06 Thread Russ Allbery
tony mancill  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.0 +
>> +++ debian/elvis-tools.prerm 2012-09-23 15:24:02.0 +
>> @@ -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  
fi

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

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=71621

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 (r...@debian.org)   


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/877gr3s6gh@windlord.stanford.edu



Re: Packages removing alternatives on upgrade

2012-10-06 Thread tony mancill
On 09/23/2012 08:40 AM, Ivan Shmakov wrote:
>> Jakub Wilk  writes:
> 
>   [Cross-posting to packages@qa, for elvis is maintained by the QA
>   group.]
> 
>  > Many packages remove alternatives on upgrade, only to re-add them
>  > later, potentially discarding manual choices of the user.
> 
>  > See also bug #71621.
> 
> […]
> 
>  > Debian QA Group 
>  >elvis
>  >elvis-console
>  >elvis-tools
>  >ircii
> 
> […]
> 
>   BTW, do I understand it correctly that it's just a matter of
>   dropping the ‘upgrade’ case from .prerm?  (Possible patch
>   MIME'd.)
> 
>   TIA.
> 
> 
> 
> 
> --- debian/elvis-console.prerm.~1~2012-09-23 13:34:49.0 +
> +++ debian/elvis-console.prerm2012-09-23 15:24:02.0 +
> @@ -3,7 +3,7 @@
>  set -e
>  
>  case "$1" in
> -upgrade|remove|deconfigure)
> +remove|deconfigure)
>  for app in editor ex input vi view; do
>  update-alternatives --quiet --remove "$app" /usr/bin/elvis
>  done
> --- debian/elvis.prerm.~1~2012-09-23 13:34:49.0 +
> +++ debian/elvis.prerm2012-09-23 15:24:02.0 +
> @@ -3,7 +3,7 @@
>  set -e
>  
>  case "$1" in
> -upgrade|remove|deconfigure)
> +remove|deconfigure)
>  for app in editor ex input vi view; do
>  update-alternatives --quiet --remove "$app" /usr/bin/elvisnox
>  done
> --- debian/elvis-tools.prerm.~1~  2012-09-23 13:34:49.0 +
> +++ debian/elvis-tools.prerm  2012-09-23 15:24:02.0 +
> @@ -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.

Thank you,
tony



signature.asc
Description: OpenPGP digital signature


Re: Packages removing alternatives on upgrade

2012-09-23 Thread Ivan Shmakov
> Jakub Wilk  writes:

[Cross-posting to packages@qa, for elvis is maintained by the QA
group.]

 > Many packages remove alternatives on upgrade, only to re-add them
 > later, potentially discarding manual choices of the user.

 > See also bug #71621.

[…]

 > Debian QA Group 
 >elvis
 >elvis-console
 >elvis-tools
 >ircii

[…]

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

TIA.

-- 
FSF associate member #7257
--- debian/elvis-console.prerm.~1~	2012-09-23 13:34:49.0 +
+++ debian/elvis-console.prerm	2012-09-23 15:24:02.0 +
@@ -3,7 +3,7 @@
 set -e
 
 case "$1" in
-upgrade|remove|deconfigure)
+remove|deconfigure)
 for app in editor ex input vi view; do
 update-alternatives --quiet --remove "$app" /usr/bin/elvis
 done
--- debian/elvis.prerm.~1~	2012-09-23 13:34:49.0 +
+++ debian/elvis.prerm	2012-09-23 15:24:02.0 +
@@ -3,7 +3,7 @@
 set -e
 
 case "$1" in
-upgrade|remove|deconfigure)
+remove|deconfigure)
 for app in editor ex input vi view; do
 update-alternatives --quiet --remove "$app" /usr/bin/elvisnox
 done
--- debian/elvis-tools.prerm.~1~	2012-09-23 13:34:49.0 +
+++ debian/elvis-tools.prerm	2012-09-23 15:24:02.0 +
@@ -3,7 +3,7 @@
 set -e
 
 case "$1" in
-upgrade|remove|deconfigure)
+remove|deconfigure)
 update-alternatives --quiet --remove ctags /usr/bin/elvtags
 ;;
 failed-upgrade)


Re: Packages removing alternatives on upgrade

2012-09-23 Thread Josselin Mouette
Le dimanche 23 septembre 2012 à 13:49 +0200, Jakub Wilk a écrit : 
> Many packages remove alternatives on upgrade, only to re-add them later, 
> potentially discarding manual choices of the user.

Thanks for the report.

> Josselin Mouette 
>gedit (U)

I’ve fixed it in the SVN.

-- 
 .''`.  Josselin Mouette
: :' :
`. `'
  `-


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1348401369.2606.0.camel@tomoyo



Packages removing alternatives on upgrade

2012-09-23 Thread Jakub Wilk
Many packages remove alternatives on upgrade, only to re-add them later, 
potentially discarding manual choices of the user.


See also bug #71621.

--
Jakub Wilk
Aaron M. Ucko 
   ncbi-tools-x11 (U)

Abou Al Montacir 
   fp-compiler-2.6.0 (U)
   fp-ide-2.6.0 (U)
   fp-utils-2.6.0 (U)

Adam Borowski 
   chameleon-cursor-theme

Alberto Garcia 
   fuse-emulator-gtk
   fuse-emulator-sdl

Albin Tonnerre 
   e17 (U)

Alejandro Rios P. 
   op-panel (U)

Alexander Sack 
   browser-plugin-gnash (U)

Alexander Zangerl 
   gnuserv

Andrew Lee (李健秋) 
   lxsession (U)
   lxterminal (U)

Aron Xu 
   fcitx (U)

Asias He 
   ibus (U)

Barry Hawkins 
   liblucene2-java (U)

Bdale Garbee 
   dump

Cameron Dale 
   bittornado
   bittornado-gui

Carlos Laviola 
   fp-compiler-2.6.0
   fp-ide-2.6.0
   fp-utils-2.6.0

Changwoo Ryu 
   imhangul-common (U)
   nabi (U)
   qimhangul-qt4 (U)

Chris Boyle 
   aewm++
   sapphire

Chris Lawrence 
   pybliographer

Christophe Monniez 
   sleuthkit (U)

Ciaran Anscomb 
   evilwm

Clint Adams 
   freeciv-client-gtk (U)
   freeciv-client-sdl (U)
   freeciv-client-xaw3d (U)

Cristian Greco 
   sleuthkit (U)

Daiki Ueno 
   ibus (U)

Damien Raude-Morvan 
   icedtea-6-plugin (U)
   icedtea-7-plugin (U)

Daniel Baumann 
   traceroute

Daniel Baumann 
   lxsession (U)
   lxterminal (U)

Daniel Moerner 
   scheme48

Daniel Schepler 
   xzip

David Paleino 
   webkit-image-gtk
   webkit-image-qt

Debian Flash Maintainers 
   browser-plugin-lightspark

Debian Flash Team 
   browser-plugin-gnash

Debian Forensics 
   sleuthkit

Debian freesmartphone.org Team 
   vala-terminal

Debian Games Team 
   freeciv-client-gtk
   freeciv-client-sdl
   freeciv-client-xaw3d
   gargoyle-free
   love
   nethack-console
   nethack-x11
   yabause-gtk
   yabause-qt

Debian GNOME Maintainers 
   gedit

Debian Haskell Group 
   ghc

Debian Java Maintainers 
   ecj
   liblucene2-java

Debian Korean L10N 
   imhangul-common
   nabi
   qimhangul-qt4

Debian LXDE Maintainers 
   lxsession
   lxterminal

Debian Med Packaging Team 
   ncbi-tools-x11

Debian Pkg-e Team 
   e17

Debian QA Group 
   elvis
   elvis-console
   elvis-tools
   ircii

Debian Tcl/Tk Packagers 
   tcl
   tk

Debian VoIP Team 
   op-panel

Didier Raboud 
   browser-plugin-lightspark (U)

Eduard Bloch 
   icewm
   icewm-experimental
   icewm-lite

Emilio Pozuelo Monfort 
   valac-0.14 (U)
   valac-0.16 (U)

Erik de Castro Lopo 
   ghc (U)

Erik Schanze 
   unrar-free (U)

Evgeni Golov 
   yabause-gtk (U)
   yabause-qt (U)

Francesco Paolo Lovergine 
   tcl (U)
   tk (U)

Gabriele Giacone <1o5g4...@gmail.com>
   browser-plugin-gnash (U)

Giuseppe Iuculano 
   tcptraceroute

GOTO Masanori 
   lv

HIGUCHI Daisuke (VDR dai) 
   uim-xim

IME Packaging Team 
   fcitx
   gcin
   hime
   ibus

Jan Lübbe 
   e17 (U)

Jari Aalto 
   jwm
   leafpad
   levee

Jeff Breidenbach 
   liblucene2-java (U)

Jelmer Vernooij 
   tdb-tools

Joachim Breitner 
   ghc (U)
   vala-terminal (U)

Joachim Wiedorn 
   libfox-1.6-dev

Joerg Jaspert 
   muddleftpd

Jordi Mallach 
   freeciv-client-gtk (U)
   freeciv-client-sdl (U)
   freeciv-client-xaw3d (U)

Josip Rodin 
   maildrop

Josselin Mouette 
   gedit (U)

Karl Goetz 
   freeciv-client-gtk (U)
   freeciv-client-sdl (U)
   freeciv-client-xaw3d (U)

Keita Maehara 
   kinput2-canna
   kinput2-canna-wnn
   kinput2-wnn

Kenshi Muto 
   im-switch (U)

Kilian Krause 
   op-panel (U)

Kiwamu Okabe 
   uim-xim (U)

Krystian Wlosek 
   z88dk-bin

Kurt Roeckx 
   epic4
   epic4-script-lice
   epic5
   epic5-script-lice

Lennart Weller 
   libtxc-dxtn-s2tc0

LI Daobing 
   ibus (U)

Lincoln de Sousa 
   fcmp

Loic Minier 
   valac-0.14 (U)
   valac-0.16 (U)

Luca Bruno 
   uzbl

Maintainers of Vala packages 
   valac-0.14
   valac-0.16

Marc-Andre Lureau 
   valac-0.14 (U)
   valac-0.16 (U)

Marcin Owsiany 
   potool

Mark Brown 
   fort77

Martin Zobel-Helas 
   tcptraceroute (U)

Matthias Klose 
   bash
   ecj (U)
   fastjar

Matthias Klose 
   icedtea-6-plugin (U)
   icedtea-7-plugin (U)

Michael Biebl 
   gedit (U)

Michael Janssen 
   bittorrent
   bittorrent-gui

Michael Koch 
   liblucene2-java (U)

Michael Piefel 
   tkinfo

Michal Čihař 
   geeqie

Miriam Ruiz 
   browser-plugin-gnash (U)
   love (U)

Nanakos Chrysostomos 
   mpg321

Neil Roeth 
   openjade
   openjade1.3

Neutron Soutmun 
   xiterm+thai

Niko Tyni 
   jzip

Nobuhiro Iwamatsu 
   uim-xim (U)

Olly Betts 
   libwxbase2.8-dbg (U)
   libwxbase2.8-dev (U)
   libwxgtk2.8-dbg (U)
   libwxgtk2.8-dev (U)
   python-wxgtk2.8 (U)

OpenJDK Team 
   icedtea-6-plugin
   icedtea-7-plugin

Osamu Aoki 
   ibus (U)
   im-switch
   maildrop (U)

Paweł Więcek 
   pgpgpg

Pedro Ribeiro 
   poedit

Peter Michael Green 
   fp-compiler-2.6.0 (U)
   fp-ide-2.6.0 (U)
   fp-utils-2.6.0 (U)

Philipp Kaluza 
   vala-terminal (U)

Piotr Roszatycki 
   z88dk-bin (U)

Rene Engelhard 
   liblucene2-java (U)

Rolf Leggewie 
   scim

Ron Lee 
   libwxbase2.8-dbg (U)
   libwxbase2.8-dev (U)