Files
flatpak/tests
Matthew Leeds 85b7eea4f1 install: Prompt when multiple remotes match
Currently if the user doesn't specify a remote name to the install
command, Flatpak chooses the first one that has a matching ref, either
with or without user interaction depending on whether --assumeyes/-y was
used. Then if more than one remote ref is similar to the one specified,
the user is prompted to choose between them. I think this asymmetry
doesn't make much sense; why not have the user choose between remotes
just as they choose between refs?

For example, the string "libre" matches refs from both flathub and
eos-apps, so if I do "flatpak install -y libre" a remote is arbitrarily
chosen for me but I'm still prompted to choose between the refs (since
-y can't choose for you when there are mutliple choices).

So this commit changes the install command implementation to present the
user with a list of remotes that have matching refs all at once rather
than one at a time. The reason I didn't implement it this way at first
is that I was worried about the performance impact, but in testing I'm
not able to measure a difference between stopping at the first remote
with a match and checking every remote (although the story might be
different if you have many remotes or don't have up-to-date metadata
downloaded).

If there's an error searching a remote, it's treated as a warning so
that one misconfigured remote doesn't take down the whole operation with
it.

This commit also updates the unit tests so they continue to succeed.

Closes: #2288
Approved by: matthiasclasen
2018-11-06 02:48:06 +00:00
..
2016-02-25 15:27:37 +01:00
2016-06-10 12:59:11 +02:00
2017-04-24 10:04:23 +02:00
2017-04-24 10:04:23 +02:00
2016-02-25 19:03:09 +01:00
2018-10-15 06:51:58 +00:00
2018-10-15 06:51:58 +00:00
2018-10-03 13:19:35 +00:00
2018-10-23 20:10:37 +00:00
2018-10-23 20:10:37 +00:00