appstream: make kio-gdrive an addon component
ClosedPublic

Authored by elvisangelaccio on Sep 2 2018, 3:11 PM.

Details

Summary

The desktop type is the deprecated version of the
desktop-application type and is reserved for desktop applications,
which are supposed to install a .desktop file.

kio-gdrive is not a desktop application, but rather an addon.

Since we don't have a generic KIO component that we can extend, for now
we just extend all the file managers that support KIO

See https://lists.debian.org/debian-qt-kde/2018/07/msg00096.html for context.

Test Plan

appstreamcli validate

Diff Detail

Repository
R219 KIO GDrive
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio requested review of this revision.Sep 2 2018, 3:11 PM
elvisangelaccio created this revision.
mak added a comment.Sep 3 2018, 2:17 AM

You maybe don't want this to be a generic component, but instead make it an addon component instead. See https://www.freedesktop.org/software/appstream/docs/sect-Quickstart-Addons.html
The addon could extend file manages like Dolphin/Konqueror, or even the Plasma Shell itself.

Yes I was condering that, but the problem is this is an ioslave that almost anyone can use (not just dolphin or plasma).

Yes I was condering that, but the problem is this is an ioslave that almost anyone can use (not just dolphin or plasma).

If anyone (KIO-based) can use it, doesn't it make it an addon?

Yes I was condering that, but the problem is this is an ioslave that almost anyone can use (not just dolphin or plasma).

If anyone (KIO-based) can use it, doesn't it make it an addon?

Yeah but appstream requires you to set a specific application's .desktop file that the addon is supposed to extend. So for appstream clients it would become "a dolphin addon", not a generic KIO addon.

mak added a comment.Sep 5 2018, 9:01 PM

[...]
Yeah but appstream requires you to set a specific application's .desktop file that the addon is supposed to extend. So for appstream clients it would become "a dolphin addon", not a generic KIO addon.

That is not entirely correct, and I really hope the notion of ".desktop file" will finally die at some point soon... AppStream requires you to set one or multiple component-IDs that the component extends. So, if KIO had a metainfo file, you could extend it by specifying your addon to extend org.kde.kio (or whatever ID it would have).
Apps looking for extensions that know they use KIO can then also look for KIO extensions.
Since very few apps (none?) do that currently and users will want to find your module in software centers easily, I would also make your addon extend org.kde.dolphin (or whatever Dolphin's ID is) as well as Konqueror. That will likely cover 90% of all usecases.

elvisangelaccio planned changes to this revision.Sep 30 2018, 5:02 PM
In D15221#321062, @mak wrote:

That is not entirely correct, and I really hope the notion of ".desktop file" will finally die at some point soon... AppStream requires you to set one or multiple component-IDs that the component extends. So, if KIO had a metainfo file, you could extend it by specifying your addon to extend org.kde.kio (or whatever ID it would have).
Apps looking for extensions that know they use KIO can then also look for KIO extensions.
Since very few apps (none?) do that currently and users will want to find your module in software centers easily, I would also make your addon extend org.kde.dolphin (or whatever Dolphin's ID is) as well as Konqueror. That will likely cover 90% of all usecases.

Interesting, thanks for the explanation. I'll make it a dolphin addon for now, then. Waiting for a future KIO metainfo file..

  • Make it an addon instead
elvisangelaccio retitled this revision from appstream: make kio-gdrive a generic component to appstream: make kio-gdrive an addon component.Oct 14 2018, 8:48 AM
elvisangelaccio edited the summary of this revision. (Show Details)
elvisangelaccio edited the test plan for this revision. (Show Details)

@mak

What if some day someone changes the Dolphin's ID from <id>org.kde.dolphin.desktop</id> to <id>org.kde.dolphin</id> ?
Will it break this appstream file? (since I'm hardcoding .desktop in the IDs)

mak added a comment.Oct 16 2018, 12:39 PM

@mak

What if some day someone changes the Dolphin's ID from <id>org.kde.dolphin.desktop</id> to <id>org.kde.dolphin</id> ?
Will it break this appstream file? (since I'm hardcoding .desktop in the IDs)

In general, yes. These IDs should be eternal. However for the specific case of "just dropping .desktop", software centers usually have fallbacks in place.
Also, if Dolphin provides the old ID via <provides/> software centers can also do the right thing.
The better way to deal with these things though is to make the ID change once (if there's still a desktop suffix) and then never change the ID again. Or just never change the ID in general.

mak accepted this revision.Oct 16 2018, 12:40 PM
This revision is now accepted and ready to land.Oct 16 2018, 12:40 PM
This revision was automatically updated to reflect the committed changes.