Starting to adopt AppStream

Matthias Klumpp matthias at tenstral.net
Tue Aug 5 10:19:07 PDT 2014


Hi!

2014-08-05 18:44 GMT+02:00 Aleix Pol <aleixpol at kde.org>:
> Hi,
> I'm deciding to adopt AppStream on my project (KDE's Muon Discover) and then
> found that my distribution (ArchLinux) has an unbelievably old version of it
> (0.1.6).
>
> I decided to just build master and see if I get to use it, but then I've run
> into problems, so I hope you can give me a hand, so I understand it and can
> fix it.
>
> First thing, I don't know what to do, appstream-index itself seems to be
> broken, I've tried the commands in the documentation [1] and they don't
> respond well:
Looks like you've got old documentation content - try this link:
http://www.freedesktop.org/software/appstream/docs/api/html/re16.html
I'll better delete the old page then, to prevent confusion (all pages
link the correct manpage though, how did you get this link?)

> $ appstream-index --what-provides -t mimetype -v text/xml
> Unknown option --what-provides
> Run 'appstream-index --help' to see a full list of available command line
> options.
...which the becomes
$ appstream-index what-provides mimetype text/xml
:-)

> Then I understand that I need to generate the xapian database somehow, but I
> don't see anywhere what command needs to be run.
Fedora runs
appstream-index --refresh --force
on every package upgrade. There is also a PackageKit plugin taking
care of an up-to-date cache.
But in order to generate the cache, you will need AppStream data which
your distribution has to provide/generate.
For Debian-based distros, a generator is under construction, Fedora
has one (reusable for other (so far RPM-based) distros!), and OpenSUSE
has one.
The format of the metadata which is provided by distributors is
documented at http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#sect-AppStream-ASXML
, together
with the locations where it should be placed.
If you want some real-world data, you can take the Fedora data
(contains a few non-standard fields at time, but is otherwise 100%
valid): http://koji.fedoraproject.org/koji/packageinfo?packageID=18639
Debian is working on a YAML-based implementation (called DEP-11),
which will also be processed by the cache generator very soon.
If you need help with generating the data for your distribution, let
me know! (Especially if there is documentation missing)

> I would appreciate some help as I feel a bit stuck.
That happens ^^ - Admittedly, the whole "which metadata where and from
where?" thing is a bit confusing at the beginning.
Cheers,
    Matthias


-- 
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/


More information about the Distributions mailing list