Support metadata in appstream/appdata/.desktop file to blacklist an app
I’m in the process of tidying up Endless’ support for filtering which apps are shown in gnome-software — we filter out various apps which are (for example) duplicated between our flatpak remote and flathub, or which are known to not work properly on ARM, etc. The filtering is done by adding the app to the Blacklisted
category, so it’s not shown at all in gnome-software (even if installed or searched for).
Currently, this is implemented as a hard-coded blacklist, which is a pain to maintain, and which we can only update via an OS update, which is at a relatively slow cadence.
It would simplify things a lot if we could move these hard-coded blacklists to metadata in the app’s appdata, or in its .desktop
file, or in an external appstream file. I don’t think there’s already a way to do this (although if there is, I’m all ears) — so what would be the most appropriate way to add support for this upstream?
I mention the .desktop
file as an option because there’s one particular blacklist we use which blacklists ‘link’ .desktop
files. These are created elsewhere in Endless OS, and are not part of a flatpak. I don’t think there’s any additional metadata shipped with them except the .desktop
files themselves.
There are a few other things we need to blacklist, which may benefit from a similar mechanism. If you think they should be handled separately, I can split them out into one or more other issues:
- We have a whitelist of apps which are known to work on ARM; any app not on this list is blacklisted when g-s is run on an ARM machine.
- gnome-software itself is blacklisted, since it’s considered a core component of the system and hence there’s no need to show it in the apps list.