GNOME Bugzilla – Bug 785729
Fails to install .flatpakrepo file with " (1)" in its name
Last modified: 2018-01-24 17:42:03 UTC
Created attachment 356775 [details] gnome-software --verbose output for this bug I visited https://flathub.org/ and downloaded the flatpakrepo file. Apparently I have downloaded this file once before, so the browser named the new copy "flathub (1).flatpakrepo". Opening the file in GNOME Software presented me with a well-formed page with an Install button, but clicking Install silently did nothing. In the --verbose log I see the following (among other lines) when I open the file: 12:24:02:0536 Gs autogenerating unique-id for flathub (1) And when I click Install, I see the following: 12:24:16:0830 Gs adding system/*/*/source/flathub (1)/* as nothing matched hash 12:24:16:0831 As run 0x55892d878850~GsPlugin::shell-extensions(gs_plugin_app_install) 12:24:16:0831 As run 0x55892d878850~GsPlugin::packagekit(gs_plugin_app_install) 12:24:16:0831 As run 0x55892d878850~GsPlugin::fwupd(gs_plugin_app_install) 12:24:16:0831 As run 0x55892d878850~GsPlugin::flatpak(gs_plugin_app_install) 12:24:16:0831 GsPluginFlatpak chose GsFlatpak-system-default using scope 12:24:16:0831 As run 0x55892d878850~GsFlatpak-system-default::refine{flathub (1)} 12:24:16:0831 As run 0x55892d878850~GsFlatpak-system-default::refine-appstream{flathub (1)} 12:24:16:0831 As run 0x55892d878850~GsFlatpak-system-default::refine-metadata{flathub (1)} 12:24:16:0832 flatpak Calling system helper: ConfigureRemote 12:24:19:0689 Gs recovering state on flathub (1) from installing to available 12:24:19:0693 Gs failed to install flathub (1): cannot modify remote: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code0: Invalid remote name flathub (1) It appears the remote name is derived from the filename, without regard for whether it is a valid Flatpak remote name. If I rename the file to flathub
Ha. My comment was truncated at the astral plane character I entered… If I rename the file to flathub<U+1F4A9 PILE OF POO>.flatpakrepo, I see the same error but with "flathub<U+1F4A9 PILE OF POO>".
system-helper/flatpak-system-helper.c seems to be checking for the '/' char, so I assume we somehow escape PILE OF POO to a forward slash somewhere. I'll add a failing self test now and then we can work out how to fix this.
commit 4b65ab55f6beac2f20a954e60bae76f78a0663f3 (HEAD -> master) Author: Richard Hughes <richard@hughsie.com> Date: Thu Aug 3 12:39:37 2017 +0100 flatpak: Ensure remote names are valid ASCII and without spaces See https://bugzilla.gnome.org/show_bug.cgi?id=785729, although I think we also need to de-duplicate based on the URI contained in the remote file.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-software/issues/207.