Repository navigation
Conversation
|
I guess ideally Flatpak could also detect if an installation has duplicate remotes and try to remedy the situation, but that could be significantly more work. Hopefully people can just delete the duplicate. |
|
☔ The latest upstream changes (presumably e2752ab) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Hmmm. This isn't correct for OCI uris, because for those wan can use a query part on the url, (like Maybe we want a bit more complex matching, doing the above checks on the part before '?', and then a regular compare on the rest (if any). |
I checked that the trailing slash doesn't make a difference when the URL is interpreted by libostree, but for an OCI URL I don't think that's a safe assumption. In general the trailing slash matters according to https://blog.cdivilly.com/2019/02/28/uri-trailing-slashes |
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes flatpak#2979
20b4c56 to
5d52f01
Compare
|
📌 Commit 5d52f01 has been approved by |
Closes: #3065 Approved by: alexlarsson
|
☀️ Test successful - status-papr |
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes flatpak#2979 Closes: flatpak#3065 Approved by: alexlarsson (cherry picked from commit af4504c)
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes #2979 Closes: #3065 Approved by: alexlarsson (cherry picked from commit af4504c) Closes: #3111 Approved by: alexlarsson
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes #2979 Closes: #3065 Approved by: alexlarsson (cherry picked from commit af4504c)
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes flatpak#2979 Closes: flatpak#3065 Approved by: alexlarsson (cherry picked from commit 866ba64)
Currently if you have a remote configured with the URL "https://dl.flathub.org/repo/" (as you would if you use the flatpakrepo file) and you use a flatpakref file which specifies the URL "https://dl.flathub.org/repo", Flatpak tries to add a duplicate remote because it doesn't see those URLs as equal. So ignore the trailing slash when comparing remote URLs. OSTree works equally well with both kinds (it uses g_build_filename()). Flathub served flatpakref files with URLs missing a trailing slash until this commit: flathub-infra/ansible@b20694f09 Also, add a unit test that fails without this patch. Fixes #2979 Closes: #3065 Approved by: alexlarsson (cherry picked from commit 866ba64) Closes: #3115 Approved by: alexlarsson
Fixes #2979