Repository navigation
Description
Linux distribution and version
Fedora 30 and Rawhide
Flatpak version
flatpak-1.4.1-1.fc31.x86_64
bubblewrap-0.3.3-2.fc31.x86_64
ostree-2019.2-1.fc31.x86_64
Description of the problem
Too many confusing questions when installing.
Should the remote be kept for future installations? [Y/n]: y
I don't know? Why am I being asked? I have zero information to go on for the consequences of either a yes or a no answer.
Configure this as new remote 'flathub-1' [Y/n]: y
Same thing, no idea why I'm being asked this. I don't know what a remote is. I don't care what a remote is. I just want the app installed.
Required runtime for com.slack.Slack/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/18.08) found in remotes:
- flathub
- flathub-1
Which do you want to install (0 to abort)? [0-2]: 1
This is a totally screwball question, because I got suckered into saying "yes why not?" to the 2nd question and now have two identical remotes set up. Which do I want to install? I only have an idea which one to use in this case because I just so happen to know they're identical. What if they weren't the same remote? How am I supposed to know which one to pick? Does it even matter?
These are not user friendly questions to ask.
Steps to reproduce
$ sudo flatpak install com.slack.Slack.flatpakref
[sudo] password for chris:
The remote 'flathub', referred to by 'com.slack.Slack' at location https://dl.flathub.org/repo contains additional applications.
Should the remote be kept for future installations? [Y/n]: y
The application com.slack.Slack depends on runtimes from:
https://dl.flathub.org/repo/
Configure this as new remote 'flathub-1' [Y/n]: y
Required runtime for com.slack.Slack/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/18.08) found in remotes:
1) flathub
2) flathub-1
Which do you want to install (0 to abort)? [0-2]: 1
com.slack.Slack permissions:
ipc network pulseaudio x11 devices file access [1] dbus access [2]
Activity
TingPing commentedon Jun 24, 2019
It tells you the purpose right in the question, to install future packages from it.
Kinda sounds like a bug that it asked in the first place, it should have figured out you already have
flathub.cmurf commentedon Jun 24, 2019
It's not. I didn't have this remote prior to giving it a flatpakref file, I obviously don't need it again in the future because any future flatpakref file will have what's needed. Or is it obvious? Maybe I'll want to list what other things are in that remote and install them without a flatpakref? But I can't possibly know that in advance when I know nothing about flatpaks or remotes and don't really care to know. I just want the app installed. So why wouldn't flatpak just keep it around, just in case? Is there harm in keeping it around?
Three bugs. It encouraged me to add a duplicate remote with capital Y, rather than capital N. It actually added a duplicate (arguably the primary bug, it shouldn't even be asking the question). And that leads to the above third bug which is asking the user to resolve the duplicate question. I can't do that without flipping a coin, unless I know quite a bit more about flatpaks.
TingPing commentedon Jun 24, 2019
That is indeed what it means. Apps from the same repo will show up in
flatpak search(or your graphical app store) and you can directly install them.matthiasclasen commentedon Jun 25, 2019
Seems to me to be a case of wrong expectations.
While flatpak's commandline is trying to be understandable and not too cryptic, it is not a 'no question asked' interface. If you want that, try gnome-software. When using the flatpak cli, you should be prepared to learn about some fundamental concepts of flatpak, like remotes.
matthiasclasen commentedon Jun 25, 2019
That being said, there seems to be an issue here where flatpak failed to recognize that you already had the required remote, so you ended up with flathub and flathub-1, and things went downhill from there.
mwleeds commentedon Jun 25, 2019
This sounds similar to the bug fixed by #2324 but that is fixed in the version of flatpak you're using. Could you post the output of
flatpak remotes -d?cmurf commentedon Jun 26, 2019
mwleeds commentedon Jul 2, 2019
I'm able to reproduce this on Fedora Silverblue rawhide:
mwleeds commentedon Jul 2, 2019
It turns out this is because the flatpakref has
Url=https://dl.flathub.org/repowhereas the flatpakrepo it links to hasUrl=https://dl.flathub.org/repo/so they're not considered the same because of the trailing slash difference. We could either change how the flatpak{ref,repo} files are generated, or change how Flatpak compares the URLs, or both.A separate issue is that the remote that gets configured for the flatpakref ends up being a bit different than the one you would get using the flatpakrepo file; the former looks like this:
and the latter looks like this:
Perhaps a solution to that would be to introduce a new flatpakref key
Repowhich would mirrorRuntimeRepoin that it takes a flatpakrepo file but be for the app updates, and we would deprecateUrl,GPGKey, andSuggestRemoteName. However that might affect the ability to useflatpakreffiles offline (not actually sure if that works in practice but it could in theory).And just as a side note, you shouldn't need to use
sudowith flatpak (except for the repair command). It can make a mess if you ever use--userbecause then you're installing into the root user's installation not your own.mwleeds commentedon Jul 2, 2019
I guess the question is whether the equivalence of
repoandrepo/is guaranteed by flatpak/ostree and therefore true for all remotes, or a quirk of how the flathub servers are set up, in which case we should patch theflatpakrefgeneration not Flatpak. Anyone know?cmurf commentedon Jul 3, 2019
If I omit sudo,
flatpak installasksthreefourteen times for authentication, and any subsequent command like install or remote add or delete, everyone of them wants to authentication. So if I do not use sudo, I'm constantly typing in my password.You're saying that's a bug?I definitely think this is a bug. Filed #3001.mwleeds commentedon Jul 3, 2019
I don't know of any other issue with using
sudobeyond--usernot working as you might expect (but I suppose the user is expected to know not to combine the two). I agree that if anything is broken by runningsudo flatpak ..we should consider that a bug and fix it.[-]too many confusing questions when installing[/-][+]Flatpak adds a duplicate Flathub remote[/+]mwleeds commentedon Jul 22, 2019
It turns out I had already opened an issue about the trailing slash back in March: flathub/flathub#905
mwleeds commentedon Jul 23, 2019
Looks like ostree treats the URL the same with or without the trailing slash:
So I think Flatpak should treat them as equivalent, but it would be good for Flathub to also add the trailing slash, to help users on the currently out versions of Flatpak. I'll submit PRs for both.
Add trailing slash to repo URLs
dir: Ignore trailing slash in remote URIs
Add trailing slash to repo URLs
twtonicr commentedon Aug 12, 2019
EDITed and updated with solution. TL;DR - If on 18.04, don't install from standard repo.
I also had this experience same as OP:
I proceeded with option 2, and ended up with a borked installation of flatpak
Then I could not uninstall or do anything with GIMP.
For me - this turned out to be a result of installing on Ubuntu by not separately researching flatpak.
I.e. ubuntu users install using apt. Have done for so long - it's likely others will suffer this.
So via:
sudo apt install flatpak # This is a problem - read onThere is actually a package for flatpak in the official bionic repos, but it's not updated, so will result in very old v1.0.8 of flatpak
Using a fresh 18.04 install on a VM, and going back to fresh snapshot each time, I tested both the v1.0.8 and v1.4.2 versions of flatpak with the same GIMP install method.
The v1.0.8 consistently resulted in the questions above during gimp install.
The v1.4.2 installed gimp cleanly.
I had other problems on my main machine, which resulted in a repeat error about being unable to find flathub-1.
I had a borked install, and apt purge still left flatpak files in /var/lib
I can't recreate the original cause but I will mention it in case it helps someone else.
e.g. everything I tried resulted in flatpak complaining about flathub-1.
Another example
In the end I did a
a reboot for good measure and I then reinstalled using the repo as per here
https://flatpak.org/setup/Ubuntu/
And I had a good install again.
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs
dir: Ignore trailing slash in remote URIs