Add Appinfo metadata file
ClosedPublic

Authored by jriddell on Jun 13 2016, 12:48 PM.

Details

Summary

Add Appinfo metadata file

Test Plan

build and install

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jriddell updated this revision to Diff 4391.Jun 13 2016, 12:48 PM
jriddell retitled this revision from to Add Appinfo metadata file.
jriddell updated this object.
jriddell edited the test plan for this revision. (Show Details)
Restricted Application added a project: Plasma. · View Herald TranscriptJun 13 2016, 12:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
jriddell added reviewers: Plasma, Restricted Project, mak.Jun 13 2016, 12:49 PM
sebas requested changes to this revision.Jun 13 2016, 12:49 PM
sebas added a reviewer: sebas.
sebas added a subscriber: sebas.

Should also have a screenshot?

This revision now requires changes to proceed.Jun 13 2016, 12:49 PM
bshah added a subscriber: bshah.Jun 13 2016, 12:52 PM
bshah added inline comments.
plasma-desktop.metainfo.xml
11 ↗(On Diff #4391)

This is wrong, no? there is no plasma-desktop binary anymore? or you mean package name?

jriddell updated this revision to Diff 4392.Jun 13 2016, 12:57 PM
jriddell edited edge metadata.

fix binary name

In D1844#34142, @sebas wrote:

Should also have a screenshot?

No such option in metadata XML files it seems
https://techbase.kde.org/MetaInfo/Components

I wonder if it should go into plasma-workspace too

fix binary name

Well, even plasmashell is not provided by this :-D should go to plasma-workspace probably

mak edited edge metadata.Jun 13 2016, 1:00 PM
In D1844#34142, @sebas wrote:

Should also have a screenshot?

Normally I would say "yes", but since this is a so-called generic component, which means that it will be possible to search for it with cli tools and install it easily e.g. via "appstreamcli install <id>`, but it will generally not be visible in tools like Discover.
This is because installing a complete DE is usually seen to be a bad idea.

So, adding screenshots won't hurt, but they won't be as visible as type=desktop component ones.
Btw, having a generic name of Plasma means one can write metainfo files for Plasmoids (which would sett "<extends>org.kde.plasmashell</>" in their metainfo file), meaning Plasma would be able to search for Plasmoids in a distro-agnostic way, so this is a great addition.

CMakeLists.txt
158

This should be ${SHARE_INSTALL_PREFIX}/metainfo/, the "appdata" path is the legacy location.
Or simply use the e-c-m variable (which still needs to be updated to point to /metainfo at a later time).

plasma-desktop.metainfo.xml
3 ↗(On Diff #4391)

This should ideally be a reverse-domain-name, to fit the general style of AppStream unique IDs.
So something like "org.kde.plasmashell" or "org.kde.plasma-desktop".
See https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

11 ↗(On Diff #4391)

Jup, the binary name would be plasmashell. But you could omit this data block entirely, unless you want people to be able to search for the AppStream component when they know the binary name.

jriddell updated this revision to Diff 4393.Jun 13 2016, 1:13 PM
jriddell edited edge metadata.
  • seems it changed preferred directory
jriddell updated this revision to Diff 4394.Jun 13 2016, 1:16 PM
  • add screenshot
mak added inline comments.Jun 13 2016, 1:20 PM
plasma-desktop.metainfo.xml
16 ↗(On Diff #4394)

FWIW, you can omit width and height here - the AppStream generators won't trust that information in metainfo files anyway and just fetch the screenshot and update the data accordingly.
Also, the caption should probably be a bit more descriptive, e.g. "The Plasma desktop with a notes and clock widget."

3 ↗(On Diff #4391)

oh, and if this is changed, renaming the metainfo file is a useful thing to do (-> "org.kde.plasmashell.metainfo.xml")

jriddell updated this revision to Diff 4395.Jun 13 2016, 1:24 PM
  • add screenshot
  • use e-c-m install path
  • rename appstream file
jriddell updated this revision to Diff 4396.Jun 13 2016, 1:27 PM
jriddell marked 2 inline comments as done.
  • remove width/height, they get ignored. use a reverse domain name id
jriddell updated this revision to Diff 4397.Jun 13 2016, 1:29 PM
jriddell marked 3 inline comments as done.
  • better image caption
mak added inline comments.Jun 13 2016, 1:37 PM
CMakeLists.txt
158

I might be wrong with that, but shouldn't METAINFODIR be CMAKE_INSTALL_METAINFODIR (or KDE_INSTALL_* for that matter?)
Also, you probably want CMAKE_CURRENT_SOURCE_DIR instead of BINARY_DIR, to make out of tree builds work, and also adjust the filename here too ^^.

org.kde.plasmashell.metainfo.xml
17

You could even drop the type=source property here, but having it also doesn't hurt.

This revision was automatically updated to reflect the committed changes.
ruphy edited reviewers, added: VDG; removed: Restricted Project.Jun 16 2016, 6:05 PM
mak added inline comments.Jun 16 2016, 6:27 PM
org.kde.plasmashell.metainfo.xml
4

Btw, a "metadata_license" tag with a permissive license (CC0/MIT) needs to be added too, so we are sure that we can reuse the metadata downstream easily.
See https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license for details.