prerm should not remove alternative on upgrade

Bug #67698 reported by Malcolm Parsons
40
This bug affects 29 people
Affects Status Importance Assigned to Milestone
bsdmainutils (Ubuntu)
Fix Released
Undecided
Unassigned
galeon (Ubuntu)
Invalid
Low
Unassigned
gconf (Ubuntu)
Confirmed
Low
Ubuntu Desktop Bugs
gconf2 (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
gedit (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
gnome-session (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
irssi (Ubuntu)
Fix Released
Low
Emilio Pozuelo Monfort
totem (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Manually set alternatives are reset on upgrade if the prerm removes the alternative when "$1" = "upgrade"

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

I assume the logs for the upgrade can be found in bug #67696?

Changed in update-manager:
status: Unconfirmed → Needs Info
Revision history for this message
Malcolm Parsons (malcolm-parsons) wrote :

yes

Revision history for this message
Malcolm Parsons (malcolm-parsons) wrote :

gnome-session removes alternatives on upgrade.

gnome-session.prerm:
if [ "$1" = "remove" ] || [ "$1" = upgrade ]; then
  update-alternatives --remove x-session-manager /usr/bin/gnome-session
  update-alternatives --remove desktop-splash \
    /usr/share/pixmaps/splash/gnome-splash.png
  update-alternatives --remove desktop-splash \
    /usr/share/pixmaps/splash/gnome-debian-splash.png
fi
...

Other packages don't:
bash.prerm:
if [ $1 != "upgrade" ]; then
    update-alternatives --remove builtins.7.gz \
...

Is it OK for me to add tasks to this bug for the other gnome packages which do this?

Changed in update-manager:
status: Needs Info → Unconfirmed
Revision history for this message
Malcolm Parsons (malcolm-parsons) wrote :

malcolm@trillian:~$ sudo update-alternatives --config x-session-manager

There are 3 alternatives which provide `x-session-manager'.

  Selection Alternative
-----------------------------------------------
          1 /usr/bin/startkde
 + 2 /usr/bin/xfce4-session
* 3 /usr/bin/gnome-session

Press enter to keep the default[*], or type selection number: 3
Using `/usr/bin/gnome-session' to provide `x-session-manager'.
malcolm@trillian:~$ sudo dpkg --install /var/cache/pbuilder/result/gnome-session_2.16.1-0ubuntu1_amd64.deb
(Reading database ... 190488 files and directories currently installed.)
Preparing to replace gnome-session 2.16.1-0ubuntu1 (using .../gnome-session_2.16.1-0ubuntu1_amd64.deb) ...
Removing manually selected alternative - switching to auto mode
Unpacking replacement gnome-session ...
Setting up gnome-session (2.16.1-0ubuntu1) ...

malcolm@trillian:~$ sudo update-alternatives --config x-session-manager
There are 3 alternatives which provide `x-session-manager'.

  Selection Alternative
-----------------------------------------------
          1 /usr/bin/startkde
*+ 2 /usr/bin/xfce4-session
          3 /usr/bin/gnome-session

Press enter to keep the default[*], or type selection number:

Revision history for this message
Sebastien Bacher (seb128) wrote :

maybe the priority of the xfce session has changed which makes it be rated over the GNOME one now with automatic mode? Can you reproduce it with an alternative set manually?

Changed in gnome-session:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
Malcolm Parsons (malcolm-parsons) wrote :

It was manual.

12:15 < seb128> removing the "update" case seems fine to me
12:15 < seb128> I'll do that for edgy+1
12:15 < pepsiman> can I add tasks for galeon, etc
12:15 < seb128> sure
12:15 < pepsiman> k, thx
12:15 < seb128> rename the bug maybe
12:15 < seb128> something like "prerm should not remove alternative on update"
12:16 < seb128> thank *you* for working on that ;)

description: updated
Changed in gnome-session:
status: Needs Info → Unconfirmed
Changed in totem:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gnome-session:
status: Unconfirmed → Confirmed
Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gconf2:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Changed in gconf:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gconf2:
importance: Wishlist → Low
Changed in galeon:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gconf2:
assignee: nobody → desktop-bugs
Changed in totem:
assignee: nobody → desktop-bugs
Revision history for this message
Sebastien Bacher (seb128) wrote :

That upload fixes the gconf2 problem:

 gconf2 (2.18.0-1ubuntu1) feisty; urgency=low
 .
   * Sync with Debian
   * New upstream version:
     Misc:
     - Make sure error strings are utf-8
     - don't include xml-entry.h twice
     - fix leak in gconf meta info code
     - remove more popt gunk
     - when installing a batch of schema files, don't abort
       the entire transaction if one fails
     - don't close already closed file descriptors if fdwalk() is available
     - use g_file_test instead of gconf_file_test or gconf_file_exists
     - remove dead code found from coverity scan
     - retain file permissions on gconf database files when
       syncing a tree to disk
     - Add g_return_val_if_fail checks on type inputs for
       gconf_value_new_from_string
   * debian/control.in:
     - don't require the new gnome-pkg-tools package version from Debian
     - the Ubuntu Desktop Team maintains that package
   * debian/gconf2.prerm:
     - don't remove the alternative on upgrade (Ubuntu: #67698)
   * debian/rules:
     - don't use the rule to prevent upload to unstable

Changed in gconf2:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Bug fixed for gedit with this upload:

 gedit (2.18.0-0ubuntu1) feisty; urgency=low
 .
   * New upstream version:
     - Include list of active plugins in BugBuddy reports
     - Make plugins work with python 2.5 on 64 bits architectures
     - Misc bugfixes
   * debian/gedit.prerm:
     - don't remove alternative on upgrade (Ubuntu: #67698)
   * debian/patches/80_fix_python_plugins_amd64.patch:
     - dropped, fixed with the new version

Changed in gedit:
status: Confirmed → Fix Released
Changed in irssi:
assignee: nobody → pochu
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

irssi (0.8.12-2ubuntu1) hardy; urgency=low

  * Merge with Debian, remaining Ubuntu changes:
    - Added debian/patches/90irc-ubuntu-com.dpatch (Launchpad #52690).
    - Modify Maintainer value to match the DebianMaintainerField spec.
    - debian/irssi.prerm: Do not alternative. LP: #67698.

 -- Emilio Pozuelo Monfort <email address hidden> Fri, 02 Nov 2007 18:13:28 +0100

Changed in irssi:
status: In Progress → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

bug is fixed in totem; while not mentioned in the changelog, the hardy totem-xine/totem-gstreamer package has:

if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
        update-alternatives [...]
fi

so the alternative is not reset on upgrades.

Changed in totem:
status: Confirmed → Fix Released
Revision history for this message
Gaetan Nadon (memsize) wrote :

This bug for bsdmainutils shows up as a new bug needing to be triaged. Given the time elapsed, is this bug still an issue for bsdmainutils? If so, I'll move it to Confirm.
BugSquad

Changed in bsdmainutils:
status: New → Incomplete
Revision history for this message
Malcolm Parsons (malcolm-parsons) wrote :

bsdmainutils.prerm calls update-alternatives unconditionally in Intrepid:

$ cat /var/lib/dpkg/info/bsdmainutils.prerm
#!/bin/sh

set -e

update-alternatives --remove write /usr/bin/bsd-write

so this is still a problem.

Changed in bsdmainutils:
status: Incomplete → New
Revision history for this message
Gaetan Nadon (memsize) wrote :

Thanks Malcolm

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

BugSquad

Changed in bsdmainutils:
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the current gnome-session doesn't have this issue

Changed in gnome-session (Ubuntu):
status: Confirmed → Fix Released
Michael Meskes (meskes)
Changed in bsdmainutils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in galeon (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.