flatpak / flatpak

Linux application sandboxing and distribution framework
https://flatpak.org
GNU Lesser General Public License v2.1
4.25k stars 406 forks source link

Minimizing questions at installations, if only one package is found #2774

Open fbruetting opened 5 years ago

fbruetting commented 5 years ago

Linux distribution and version

FSB29

Flatpak version

v1.2.3

Description of the problem

When I tried to install FileZilla, I even provided --user for not having to answer the question for which remote to use. Then I was surprised, that I still had to confirm to use that user-specific remote. Can this be skipped?

Then I was asked for the ref, of which there also was just one possibility. I think this could also be skipped, as the third step repeats most of the important content of that second step. Maybe the information about app/, /x86_64/stable and remote ‘flathub’ (user) can be added to the last step (at least for the case of just one result)? Feels weird having to confirm all those details, which are negligible in most cases.

> flatpak install --user filezilla                                          
Looking for matches…
Found similar ref(s) for ‘filezilla’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: y
Found ref ‘app/org.filezillaproject.Filezilla/x86_64/stable’ in remote ‘flathub’ (user).
Use this ref? [Y/n]: y

org.filezillaproject.Filezilla permissions:
    ipc      network              ssh-auth             wayland      x11
    dri      file access [1]      dbus access [2]

    [1] host, xdg-run/dconf, ~/.config/dconf:ro
    [2] ca.desrt.dconf, org.freedesktop.Notifications, org.freedesktop.PowerManagement,
        org.gnome.SessionManager

        ID                                        Arch       Zweig      Remote      Download
 1. [✓] org.filezillaproject.Filezilla            x86_64     stable     flathub      11,4 MB / 11,5 MB
 2. [✓] org.filezillaproject.Filezilla.Locale     x86_64     stable     flathub     117,9 kB / 3,8 MB

Installation complete.
mwleeds commented 5 years ago

The thing that makes this difficult is that the user could specify more than one (partial) ref, e.g. flatpak install filezilla gedit and since the way it's currently written the install command will only execute one transaction which can only operate on one installation, you have to confirm the remote (and installation) before moving on to confirming each ref match. Otherwise if filezilla is found in a remote in the user installation and gedit is found in the system installation, it would be less clear why gedit can't be found after you chose to install filezilla from the other installation. If we want to reduce the number of prompts, we could either:

The first option would be the easiest but the second would probably be the more user friendly option.

matthiasclasen commented 5 years ago

yeah, we should probably come up with a list of remotes that have matches for all the partial refs, and only offer a remote choice if that list has more than one member