#187 gnome-software should allow configuring which software source takes precedence when installing software
Opened a year ago by catanzaro. Modified a month ago

Splitting this off of #151.

Proposal: gnome-software should have a configuration option to allow the user to prefer certain software sources before others. E.g. users who don't like Fedora flatpaks might want to configure RPMs or flathubs to take precedence, without completely removing the Fedora flatpak repo in case they want to install certain apps from there.


For what it's worth (maybe I'm totally off topic with it here), I kind of liked the idea to ask when a user wants to install some software in parallel [1], aka when an application would be installed from multiple sources. That won't fix this, but it would help to avoid surprises by the users, which I've seen in the recent past, when they had installed both Flatpak and RPM version without them noticing, starting different version from GUI (.desktop file) and from the command line.

[1] https://gitlab.gnome.org/GNOME/gnome-software/-/issues/72

It's worth noting that software handles multiple types of software source, some of which overlap, and some of which don't. So we're not talking about a simple prioritised list of sources here, at least as far as the UI would be concerned.

Metadata Update from @catanzaro:
- Issue tagged with: meeting

8 months ago

Action: Allan to propose a new design for software sources configuration to the GNOME Software maintainers, including Milan, which should allow for prioritizing software sources. For example, a user might prefer to prioritize Flathub flatpaks over Fedora RPMs over Fedora flatpaks.

For what it's worth (maybe I'm totally off topic with it here), I kind of liked the idea to ask when a user wants to install some software in parallel [1], aka when an application would be installed from multiple sources.

We don't feel that the extra friction of prompting the user to select the source to use is necessary. The addition of a mechanism for configuring source priorities, in addition to the existing mechanism for users to select any available source when installing the app, should be sufficient.

Metadata Update from @catanzaro:
- Issue untagged with: meeting
- Issue tagged with: pending-action

7 months ago

Action: Allan to propose a new design for software sources configuration to the GNOME Software maintainers, including Milan, which should allow for prioritizing software sources. For example, a user might prefer to prioritize Flathub flatpaks over Fedora RPMs over Fedora flatpaks.

I thought the conclusion in the meeting was that we'd go with a config file for this, to begin with?

The addition of a mechanism for configuring source priorities

The question is who's going to make that decision.

While the extra prompt whether the user does what he/she really wants to do might look unneeded, it can help avoid mistakes. Real life mistakes, I had few users having installed two Evolutions, while they did not know they installed both RPM and Flatpak/Flathub versions.

I thought the conclusion in the meeting was that we'd go with a config file for this, to begin with?

A lot of things were said in that meeting. :P

That might be a good starting point, but I don't think a config file alone solves the issue here. To solve this issue, the user should have some graphical way to change priorities among software sources.

The question is who's going to make that decision.

The user should be allowed to configure arbitrary priorities. The point of this issue is to let the user decide.

While the extra prompt whether the user does what he/she really wants to do might look unneeded, it can help avoid mistakes.

Yeah, but at the cost of too much extra friction. Users who don't understand the technical differences between different software sources shouldn't be forced into a choice paralysis scenario where they have to choose which source to use when installing an app. And users who do understand software sources would probably prefer to configure sources once and have those preferences respected automatically in the future, right? So we have picked the default that we think is best for most users -- Fedora flatpaks -- as the source to use by default. But it would be nice to allow users to change that once, via software source configuration, instead of having to remember to change it every single time when installing an app.

Real life mistakes, I had few users having installed two Evolutions, while they did not know they installed both RPM and Flatpak/Flathub versions.

Well that would just be a GNOME Software bug. If Evolution is installed in any format, the user should not be able to install it again in some different format.

If Evolution is installed in any format, the user should not be able to install it again in some different format.

Why not? Advanced users might know what they are doing, as you said few lines above. I'd like to warn about it at least, but I understand it's an off topic for this bug. I'm sorry for the noise.

One of the things I wanted from the meeting was a list of use cases that this is intended to cater to. The main ones I got were:

  • User has a development repo - say for nightly apps - which they want to use for testing, but don't want to be automatically used when installing apps for everyday use.
  • User wants to use Flathub to install additional apps that aren't in the Fedora repos, but would still prefer to use RPMs from Fedora when possible.
  • User wants to use a 3rd party RPM repo to install packages they can't get from Fedora, but would still prefer to use RPMs from Fedora when possible.

Any others?

Why not? Advanced users might know what they are doing, as you said few lines above. I'd like to warn about it at least, but I understand it's an off topic for this bug. I'm sorry for the noise.

Well, if Evolution in installed, then GNOME Software should display it as installed and offer Launch or Uninstall buttons instead of an Install button, right? It doesn't have any way to install the same app multiple times? (It's really hard to imagine why we might want to allow users to install the same app multiple times, except perhaps a developer testing the application, which can be done via command line....)

Metadata Update from @aday:
- Issue assigned to aday

7 months ago

Well, if Evolution in installed, then GNOME Software should display it as installed and offer Launch or Uninstall buttons instead of an Install button, right?

Right, the installed application is preselected when one shows details of the application. I do not know how they managed to install both of them. I did reproduce it too some time ago, but I cannot reproduce it now.

It doesn't have any way to install the same app multiple times?

You can do it, you simply change the Source of the application, at the top right corner. When there are more sources available, all are shown there.

The UX for installing multiple versions of the same app is another area of Software that needs review and thought. We never got around to implementing the old designs that we had for it, and some things have changed since then. Maybe that's something to put on the list for GNOME 41/Fedora 35.

I'm looking at this as part of an ongoing redesign of the software repositories preferences in gnome-software. From a design perspective it seems that there are two aspects to it:

  1. Preferences to set the priority of repos of a given type (could potentially be limited to software formats that support repo prioritisation)
  2. A preference to set the relative priority of flatpaks and packages

From an upstream perspective, 2 is potentially a little tricky given that we don't control which formats are used/available. Maybe it could be a Fedora-ism though.

There's also a question regarding the 3rd party repos. Currently these are shown in a separate group, in order to communicate where they came from and provide some additional information about them. If we want repo prioritisation, we'd likely need to remove this grouping, since you'd presumably want to be able to set their priority along with the other repos. That's maybe not a deal-breaker but is worth considering.

Personally I'm somewhat reluctant to add additional complexity to the settings (they're already fairly complex). But the new design is more compatible with prioritisation than the old one, so maybe it's something we could return to.

I'm looking at this as part of an ongoing redesign of the software repositories preferences in gnome-software. From a design perspective it seems that there are two aspects to it:

  1. Preferences to set the priority of repos of a given type (could potentially be limited to software formats that support repo prioritisation)
  2. A preference to set the relative priority of flatpaks and packages

From an upstream perspective, 2 is potentially a little tricky given that we don't control which formats are used/available. Maybe it could be a Fedora-ism though.

  1. is what's needed to solve this issue. We're not getting user complaints about 1.

There's also a question regarding the 3rd party repos. Currently these are shown in a separate group, in order to communicate where they came from and provide some additional information about them. If we want repo prioritisation, we'd likely need to remove this grouping, since you'd presumably want to be able to set their priority along with the other repos. That's maybe not a deal-breaker but is worth considering.

Seems fine to me.

We need 1 as well for mass-managed cases where one format is preferred to another.

There's also a question regarding the 3rd party repos. Currently these are shown in a separate group, in order to communicate where they came from and provide some additional information about them. If we want repo prioritisation, we'd likely need to remove this grouping, since you'd presumably want to be able to set their priority along with the other repos. That's maybe not a deal-breaker but is worth considering.

Seems fine to me.

Previously I think there was a requirement that we provide accompanying information for the 3rd party repos (the material on the wiki). So I think the main question is whether that's still a requirement, because if it is we need a way to identify the 3rd party repos and link to the information about them. It might be OK, but we should probably check.

We need 1 as well for mass-managed cases where one format is preferred to another.

1 is repo preference within a particular format, as opposed to preference between different formats. Did you mean 2?

We need 1 as well for mass-managed cases where one format is preferred to another.

1 is repo preference within a particular format, as opposed to preference between different formats. Did you mean 2?

Oh, yeah. I mixed up and misread it. But 1 is still needed because sometimes local override packages are needed.

Just for the record, the RPM versus Flatpak might be covered by the upstream bug:
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1005

What Allan is suggesting, as we spoke about it elsewhere, felt as two options for me initially (one for each of the above points), but looking on it now, a single option with the plugin/format priority order would be sufficient. The distro can set it to some defaults, while the user will be able to change it as he/she wants to.

Looks like @mcrha landed an initial fix for this: https://gitlab.gnome.org/GNOME/gnome-software/-/commit/294a10419ce02e71553bc459aad471fa2cffe7cf

Let's leave this ticket open to encourage testing, with a view to closing it for F35 .

Metadata Update from @aday:
- Issue untagged with: pending-action
- Issue set to the milestone: Fedora 35

2 months ago

Metadata Update from @aday:
- Issue tagged with: testing

a month ago

Looks like @mcrha landed an initial fix for this: https://gitlab.gnome.org/GNOME/gnome-software/-/commit/294a10419ce02e71553bc459aad471fa2cffe7cf

Let's leave this ticket open to encourage testing, with a view to closing it for F35 .

I don't think there's any UI to control the value of this setting? So I don't consider this to be fixed.

You are right, there is missing the UI bit. I think we talked about some way in the Repositories dialog, maybe by drag&drop the sections, but then there was found an obstacle or something. Or there was decided to make the decision on the packaging/distribution level and do not bother the users in the GUI at all. I do not recall precisely, I'm sorry.

I thought we decided to go for a non-visible preference to begin with...

It's slightly ironic that the original complaint here was actually brought by Milan, who is now maintaining GNOME Software. So if he is OK with the current solution, I suppose we might as well close this.

Defaulting to flatpaks has caused some confusion for users, but I haven't seen many complaints fortunately.

As it is right now, without the UI elements, works for me. Not everything can be in the UI.

The idea from the packager point of view would be to set "flatpak" precedence for the Silverblue and the "rpm" preference for the rest. If there is an easy way to know that in time of the package installation. Of course, if it's acceptable by the outer audience. I didn't do anything in this regard in the .spec file yet.

The WG has previously agreed we want to prefer Flatpaks by default for Workstation in addition to Silverblue. We just wanted the user to have a way to opt-out of this if desired.

As long as there's a way for preloads or customized deployments to switch preferences and we document it somewhere, I'm fine with it.

The WG has previously agreed we want to prefer Flatpaks by default for Workstation in addition to Silverblue. We just wanted the user to have a way to opt-out of this if desired.

Would you mind to open a gnome-software bug in the RH bugzilla, thus there's a reference for the change in the .spec file, please? Whether it's only for rawhide or also for the f35 I'll left up to the decision makers.

As long as there's a way for preloads or customized deployments to switch preferences and we document it somewhere, I'm fine with it.

It's as simple as gsettings set org.gnome.software packaging-format-preference "['rpm', 'flatpak']" (the .spec file change will have them in the opposite order). it can be only a single value too, just "what is preferred", and the other packaging formats will be sorted anyhow in the GUI.

Why do we need a bug? We don't want to change anything?

I thought it'll be better to have explicitly set in Fedora that the Flatpak is preferred. It'll also make sure the Flatpak is preferred, regardless what the upstream code will prefer in the future. When the preference is not set the code may prefer anything (to be honest, I do not know the rule for the preference without the setting being set; it can be by name, by plugin load order, by anything).

Login to comment on this ticket.

Metadata