Tying application ID to buildtype is problematic
!18 (merged) introduced behaviour where the app ID org.gnome.Characters
or org.gnome.CharactersDevel
is tied to whether the Meson --buildtype
contains the string debug
.
This is problematic if you want to build a debugoptimized
build and strip the debug symbols, but still use the org.gnome.Characters
ID. I ran into this while updating the Flathub package. Flatpak strips debug symbols into a .Debug
"extension" which can be installed separately. With --buildtype debugoptimized
, the app ID becomes org.gnome.CharactersDevel
, which does not match the Flatpak app ID org.gnome.Characters
, so the app cannot be launched.
I worked around this by using --buildtype release
and accepting that there will be no debug symbols for the application. I could also have specified the flags by hand – in fact I think the manifest already does. I understand the desire to get rid of the custom build option, but in this case the result is somewhat problematic. Perhaps the check could be changed to:
-characters_application_id = characters_name + (get_option('buildtype').contains('debug') ? 'Devel' : '')
+characters_application_id = characters_name + (get_option('buildtype') == 'debug') ? 'Devel' : '')
if you're keen to avoid a separate build option? (debug
is the default, so the current behaviour from running meson setup builddir
would be unchanged.)