Just fresh hot of the press, session-migration is now available in quantal.
This small tool is trying to solve a problem we encountered for a long time as a distributor, but had to postpone it way too long because of other priorities. :) It basically enables packagers and maintainers to migrate in user session data. Indeed, when you upgrade a package, the packaging tools are running under root permissions, and only hackish solutions was used in the past to enable us to change some parts of your user configuration, like adding the FUSA applet, adding new compiz plugins on the fly… There are tons of example when a distribution needs to migrate some user data (logged or not when the upgrade is proceeding) without patching heavily the upstream project to add a migration support there.
This tool is executed at session startup, in a sync fashion. It contains caching and tries to execute the minimal chunk, based on the design of the excellent gconf->gsettings migration tool. It contains as well a dh-migrations package, with a debhelper hook (
--with migrations calling
dh_migrations), so that client desktop packages just have to ship a
debian/<package>.migrations file linking to their migration scripts which will be shipped in the right directory. We can even imagine in the near future that when you install such a package, you end up with a notification that a session restart is necessary (and not a full reboot). Note as well that the migration happens per user and per session, so it's really important that the scripts are idempotents.
Was 3 days of fun coding this. ;) All of the C and perl codes are covered by a short, but complete testsuite run during the package build, so no breakage hopefully. ;) Associated man pages are session-migration and dh_migrations.
The illustrated session icon is under a GPL licence, found on iconfinder.