Present full list of featured apps even to distros with bad AppStream data
AbandonedPublic

Authored by ngraham on Jan 26 2018, 9:53 PM.

Details

Reviewers
apol
Group Reviewers
Discover Software Store
Summary

Many distros, like Ubuntu and distros based on it (like KDE Neon), have historically provided bad AppStream data.

This is a problem in many ways, but one really obvious one is for Discover: Our list of featured apps searches for apps by AppStream ID, and when then the ID we search for doesn't exactly match what the distro provides, the app isn't found, and the list of featured apps is abnormally short and awkward-looking.

This patch updates the list of featured apps to provide three forms of the AppStream URL for each one to make sure that we display the right list of apps even on distros that provide bad AppStream data.

filterDupes() takes care of ensuring that we don't get duplicate entries.

This patch also makes us forward-compatible once Blender and Inkscape accept my patches to fix their upstream AppStream data:

Test Plan

Tested by manually modifying the contents of ~/.cache/discover/featured-5.9.json in KDE Neon, which is probably one of the worst-case scenarios, being based on Ubuntu 16.04.

Before:

After:

Diff Detail

Repository
R889 Autoconfiguration Website
Branch
discover-featured-apps-tweaks
Lint
No Linters Available
Unit
No Unit Test Coverage
ngraham requested review of this revision.Jan 26 2018, 9:53 PM
ngraham created this revision.
ngraham edited the test plan for this revision. (Show Details)Jan 26 2018, 9:53 PM
ngraham edited the summary of this revision. (Show Details)Jan 26 2018, 10:03 PM
ngraham edited the summary of this revision. (Show Details)Jan 26 2018, 10:20 PM
apol added a comment.Jan 26 2018, 10:48 PM

I'm not sure this is the best place to solve it. This will also show on de-duplication.

discover/featured-5.9.json
11

Why did you drop org.kde.development for kdevelop? It's a different thing (org.kde.development will pull most interesting development frameworks as well)

In D10129#196591, @apol wrote:

I'm not sure this is the best place to solve it. This will also show on de-duplication.

I confirmed that we don't get duplicates, even on a system with many backends where we do see dupes on the app lists. FeatureModel::filterDupes() seems to take care of duplicates on the Featured page.

discover/featured-5.9.json
11

I thought we were trying to show KDevelop, sorry. What does org.kde.development show? appstreamcli search doesn't return anything for it on any of my systems.

apol added inline comments.Jan 28 2018, 2:22 PM
discover/featured-5.9.json
11

It should at least on Neon, although I hear they have some issues with their appstream data. Works on ArchLinux too.

$ appstreamcli search org.kde.development --details
Identifier: org.kde.development [generic]
Name: KDE Development
Summary: A development environment for Qt and KDE Applications
Package: kde-development-environment-meta
Description: Install everything you need for a full KDE development system for developing 
  your own software or extending existing one.
  
  It will install all required dependencies for compiling most KDE software (Qt, 
  KDE Frameworks, etc) and will offer to install the tools we've created to help the 
  KDE development.
Default Screenshot URL: https://www.kdevelop.org/sites/www.kdevelop.org/files/inline-images/kdevelop5-breeze_2.png
Project Group: KDE
License: GPL-2.0+
ngraham added inline comments.Jan 28 2018, 9:50 PM
discover/featured-5.9.json
11

It does not work in KDE Neon.

ngraham added a subscriber: mak.Jan 28 2018, 10:03 PM