Stop installing two desktop files

Authored by ngraham on Aug 20 2019, 6:54 PM.


Group Reviewers

System Settings installs two desktop files, and uses one with "KDE" in the name when
run in a non-Plasma session. Unfortunately in today's world, this causes System Settings
to appear twice in app lists (Discover, GNOME Software, appstreamCLI, etc). For example:

It wasn't a bad idea, but I don't think it really works anymore.

Test Plan

Can't test AppStream changes :/

Diff Detail

R124 System Settings
remove-redundant-desktop-file (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 15369
Build 15387: arc lint + arc unit
ngraham created this revision.Aug 20 2019, 6:54 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 20 2019, 6:54 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Aug 20 2019, 6:54 PM

As KDevelop is affected similar, because we want two different entries to appear in the system application menu, can someone tell where appstream defines that there shall be only one menu desltop file per application? Why do those installers even look at the menu entry defining desktop files, should they not use the appdata files to model their world of application entities?

Can't the "world of appstream installers and checkers" not be adapted to the actual real world?

Those are excellent questions. Reading through, it seems like .desktop files only get parsed if there's no appdata.xml file--which indeed, System Settings lacks. Maybe that's the right approach here...

ngraham added a subscriber: mak.Aug 20 2019, 7:34 PM

Abandoning in favor of D23306, which adds an AppStream metadata file with multiple launchable tags. If I'm reading the docs right, this should allow the information from the referenced .desktop files to NOT be merged into the data from the appdata.xml file, which, if it works, should be the right approach for KDevelop too. Hopefully @mak will chime in regarding whether this is accurate or not.

ngraham abandoned this revision.Aug 20 2019, 7:34 PM
mak added a comment.Aug 20 2019, 8:03 PM

@kossebau You'll also want to annotate the .desktop files correctly to hide them. See for details.

The split with two different desktop files was imposed upon us by the GNOME packagers at Ubuntu so eliminating the extra file isn't an option I'm afraid.