After certain upgrades (most notably upgrades between Ubuntu releases), there are follow-up actions which should be taken by the user. These are not logically part of the upgrade, but should be dealt with at some point after the upgrade is complete.

A prime example is the UTFEightMigrationTool. During an upgrade from WartyWarthog to HoaryHedgehog, the system will be configured such that UTF-8 encoding is available, and will be expected by applications per default. The user should switch to a UTF-8 locale, and possibly rename or re-encode files in order to achieve the best user experience. These things cannot be done in automated fashion during the upgrade, but must instead be dealt with interactively by the user.

Another example is the reboot notification. Packages like the kernel, glibc, dbus and hal require a reboot. To simplify things update-notifier installs a helper script in

/usr/share/update-notifier/notify-reboot-required

that can be called in the packages postinst script (make sure to check for it first). It is i18n-able via langpacks and it will only be shown once.

Original Proposed design

Design Spec

Status

Example

_Name: The great UTF-8 Migration
Priority: Medium
Command: bc
Terminal: True
GettextDomain: hwdb-clinet
DisplayIf: shell-command
Title: Change the default title here
DontShowAfterReboot: False
_Description: 
 This command will convert your stuff into UTF-8.
 Use this command if you want a working gnome desktop and you
 feel the world should be a better place.

This is a notification description file as it should be put into a source package. NB the '_' prefix for fields that should be translated. For getting these strings into the package's PO template, you should add a stanza like this to po/POTFILES.in:

[type: gettext/rfc822deb] debian/utf8-migration.installnote

The file should be shipped in /usr/share/packagename and the package's postinst script should install it if the notification should be displayed. At that time it needs to remove the '_' prefixes:

install -d /var/lib/update-notifier/user.d/
sed 's/^_//' /usr/share/utf8-migration-tool/utf8-migration.installnote > /var/lib/update-notifier/user.d/utf8-migration

There are other use-cases where this is useful. The user can be told that he needs to reboot his system after a kernel upgrade. Or relogin when when certain parts of gnome changes etc.

CategoryArchive

InteractiveUpgradeHooks (last edited 2009-09-30 13:32:36 by 10)