Clone wiki

speedcrunch / AppStreamMetadata

AppStream Metadata

AppStream is a metadata format to provide richer information for (Linux) software centers. The metadata XML files are provided by the upstream projects (usually) and processed by distributions to be fed to their software management clients.

NB: AppStream support is still pretty new in many distributions. Any instructions below should work with Ubuntu 16.04 and Fedora 24 (or newer), but may require installing additional packages. Other distributions likely also work if they have the necessary tools.

Validation

Run

appstream-util validate pkg/speedcrunch.appdata.xml

or

appstream-util validate-strict pkg/speedcrunch.appdata.xml

to validate the appdata file. "-strict" does extra checks like verifying the aspect ratio of screenshots. Ideally, both should complete without errors.

Test the Appdata File

Normally, the appdata file is parsed by the distributions and provided alongside their online package repositories. Testing the appdata file "live" requires injecting it into the system's AppStream cache so local software managers can display it. GNOME Software is probably the most common software center with AppStream support at this point.

  1. In pkg/speedcrunch.appdata.xml, add <package>speedcrunch</package> somewhere in the root <component> XML tag. This information is normally added in a later step by the distribution's processes; all the tools require a package name, so injecting one here is the most straightforward solution.
  2. Build SpeedCrunch and install it into /usr.
  3. Generate the metadata bundle that's normally downloaded from the distribution's repositories: sudo appstream-compose --origin local speedcrunch

  4. Regenerate the local AppStream cache:

    sudo appstreamcli refresh-index --verbose --force

  5. Restart GNOME Software:

    killall gnome-software; gnome-software --verbose

  6. Search for "speedcrunch". You should see the information from the appdata and .desktop files in your local SpeedCrunch source rather than the metadata from the distribution.

To revert these changes, delete the files created by appstream-compose (check its output) and re-run appstreamcli refresh-index.

Updated