<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 5, 2014 at 7:19 PM, Matthias Klumpp <span dir="ltr"><<a href="mailto:matthias@tenstral.net" target="_blank">matthias@tenstral.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
2014-08-05 18:44 GMT+02:00 Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>>:<br>
<div class="">> Hi,<br>
> I'm deciding to adopt AppStream on my project (KDE's Muon Discover) and then<br>
> found that my distribution (ArchLinux) has an unbelievably old version of it<br>
> (0.1.6).<br>
><br>
> I decided to just build master and see if I get to use it, but then I've run<br>
> into problems, so I hope you can give me a hand, so I understand it and can<br>
> fix it.<br>
><br>
> First thing, I don't know what to do, appstream-index itself seems to be<br>
> broken, I've tried the commands in the documentation [1] and they don't<br>
> respond well:<br>
</div>Looks like you've got old documentation content - try this link:<br>
<a href="http://www.freedesktop.org/software/appstream/docs/api/html/re16.html" target="_blank">http://www.freedesktop.org/software/appstream/docs/api/html/re16.html</a><br>
I'll better delete the old page then, to prevent confusion (all pages<br>
link the correct manpage though, how did you get this link?)<br></blockquote><div>From a search engine I think, either Google or DuckDuckGo.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div class=""><br>
> $ appstream-index --what-provides -t mimetype -v text/xml<br>
> Unknown option --what-provides<br>
> Run 'appstream-index --help' to see a full list of available command line<br>
> options.<br>
</div>...which the becomes<br>
$ appstream-index what-provides mimetype text/xml<br>
:-)<br></blockquote><div>Ok<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><br>
> Then I understand that I need to generate the xapian database somehow, but I<br>
> don't see anywhere what command needs to be run.<br>
</div>Fedora runs<br>
appstream-index --refresh --force<br></blockquote><div>appstream-index refresh<br>^<br></div><div>That right? --refresh is not supported it says.<br><br></div><div>I think I'm getting an empty database now, though, given that my distribution doesn't seem to be supported.<br>

</div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
on every package upgrade. There is also a PackageKit plugin taking<br>
care of an up-to-date cache.<br>
But in order to generate the cache, you will need AppStream data which<br>
your distribution has to provide/generate.<br>
For Debian-based distros, a generator is under construction, Fedora<br>
has one (reusable for other (so far RPM-based) distros!), and OpenSUSE<br>
has one.<br>
The format of the metadata which is provided by distributors is<br>
documented at <a href="http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#sect-AppStream-ASXML" target="_blank">http://www.freedesktop.org/software/appstream/docs/chap-DistroData.html#sect-AppStream-ASXML</a><br>


, together<br>
with the locations where it should be placed.<br>
If you want some real-world data, you can take the Fedora data<br>
(contains a few non-standard fields at time, but is otherwise 100%<br>
valid): <a href="http://koji.fedoraproject.org/koji/packageinfo?packageID=18639" target="_blank">http://koji.fedoraproject.org/koji/packageinfo?packageID=18639</a><br>
Debian is working on a YAML-based implementation (called DEP-11),<br>
which will also be processed by the cache generator very soon.<br>
If you need help with generating the data for your distribution, let<br>
me know! (Especially if there is documentation missing) <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><br>
> I would appreciate some help as I feel a bit stuck.<br>
</div>That happens ^^ - Admittedly, the whole "which metadata where and from<br>
where?" thing is a bit confusing at the beginning.<br>
Cheers,<br>
    Matthias<br>
<span class=""><font color="#888888"><br>
<br>
--<br>
Debian Developer | Freedesktop-Developer<br>
I welcome VSRE emails. See <a href="http://vsre.info/" target="_blank">http://vsre.info/</a><br>
</font></span></blockquote></div><br><br><div>Are generators what we have in src/data-providers, correct?<br><br></div>There's something I don't understand though. It seems to me that if we have a packagekit backend, then we're served, as in we can populate the database only with the appdata.xml files we can do the inverse look-up of the provide fields and populate the database. Is there anything I'm missing? I would prefer not to write much archlinux-dependent code if it's not strictly necessary.<br>

<br><br></div><div class="gmail_extra">Aleix<br></div></div>