Control: tags -1 + upstream Control: clone -1 -2 -3 Control: reassign -2 mc 3:4.8.29-2 Control: retitle -2 mc: Regex key in mc.ext.ini expects GLib to use non-standard Desktop Entry parsing Control: reassign -3 notmuch Control: retitle -3 notmuch: expects GLib to use non-standard Desktop Entry parsing Control: tags -1 + fixed-upstream pending
On Wed, 06 Sep 2023 at 22:49:52 +0000, Michael Gold wrote: > > After upgrading libglib2.0-0 from 2.77.2-1 to 2.77.3-1, I'm no longer > able to open files by selecting them in Midnight Commander and pressing > Enter. A change in the behaviour of g_key_file_get_string() appears to > be the cause. For example, one section of the mc.ext.ini file contains: > [pdf] > Regex=\.(pdf|PDF|ps|djvu)$ > Open=pdf %f & If whatever program is loading this file (presumably mc) is parsing Regex as if it was the 'string' or 'localestring' type from the Desktop Entry Specification[1], then this is not syntactically valid Desktop Entry syntax: in a 'string' or 'localestring', backslashes that are not part of one of the known escapes \s, \n, \t, \r or \\ must be doubled. GLib's g_key_file_get_string() is designed to load a 'string' or 'localestring' from a .desktop file, or a file in a compatible format. [1] https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#value-types Or, if mc wants to get everything after the "=" (and do its own unescaping, if any), then it should call g_key_file_get_value(), which does not process those backslash escapes, instead of g_key_file_get_string(); or it could use a different .ini-style parser if that's what is preferred. I'm told this is being discussed upstream, but I don't have a specific bug reference for that. notmuch is apparently also affected by this and needs to make a similar choice: https://gitlab.gnome.org/GNOME/glib/-/issues/3094#note_1839232 GLib 2.77.3 made the error behaviour of g_key_file_get_string() more conventional, triggering this regression. GLib 2.78.0 reverts that change (see https://gitlab.gnome.org/GNOME/glib/-/issues/3094, https://gitlab.gnome.org/GNOME/glib/-/issues/3095) and that version will be uploaded to Debian unstable soon; but the change is likely to be reinstated in a future version of GLib (see https://gitlab.gnome.org/GNOME/glib/-/issues/3098). smcv