diff -Nru ubiquity-20.04.15.3/debian/changelog ubiquity-20.04.15.4/debian/changelog --- ubiquity-20.04.15.3/debian/changelog 2021-01-13 14:42:57.000000000 +0000 +++ ubiquity-20.04.15.4/debian/changelog 2021-01-21 14:29:03.000000000 +0000 @@ -1,3 +1,10 @@ +ubiquity (20.04.15.4) focal; urgency=medium + + * Backport Dimitri's misc.py change from groovy: unset gsd keys to trigger + keyboard settings migration. (LP: #1892040) + + -- Ɓukasz 'sil2100' Zemczak Thu, 21 Jan 2021 15:29:03 +0100 + ubiquity (20.04.15.3) focal; urgency=medium * Automatic update of included source packages: diff -Nru ubiquity-20.04.15.3/ubiquity/misc.py ubiquity-20.04.15.4/ubiquity/misc.py --- ubiquity-20.04.15.3/ubiquity/misc.py 2020-07-20 16:24:43.000000000 +0000 +++ ubiquity-20.04.15.4/ubiquity/misc.py 2021-01-21 14:28:25.000000000 +0000 @@ -706,6 +706,8 @@ Gtk gsettings_key = ['org.gnome.libgnomekbd.keyboard', 'layouts'] + gsettings_sources = ('org.gnome.desktop.input-sources', 'sources') + gsettings_options = ('org.gnome.desktop.input-sources', 'xkb-options') lang = lang.split('_')[0] variants = [] @@ -846,6 +848,23 @@ # Use the system default if no other keymaps can be determined. gsettings.set_list(gsettings_key[0], gsettings_key[1], []) + # Gnome Shell only does keyboard layout conversion from old + # gsettings_key once. Recently we started to launch keyboard plugin + # during ubiquity-dm, hence if we change that key, we should purge the + # state that gsd uses, to determine if it should run the + # conversion. Which are a stamp file, and having the new key set. + # Ideally, I think ubiquity should be more universal and set the new key + # directly, instead of relying on gsd keeping the conversion code + # around. But it's too late for 20.10 release. + gsettings_stamp = os.path.join( + '/home', + os.getenv("SUDO_USER", os.getenv("USER", "root")), + '.local/share/gnome-settings-daemon/input-sources-converted') + if os.path.exists(gsettings_stamp): + os.remove(gsettings_stamp) + gsettings.unset(*gsettings_sources) + gsettings.unset(*gsettings_options) + engine.lock_group(0)