In my second week, I have created an way for AppStream to handle an XML recommendation file.
A recommendation XML file would be something on the following format:
<?xml version="1.0"?>
<recommendations>
<recommendation>
<id>vim.desktop</id>
<because>
<id>emacs.desktop</id>
</because>
</recommendation>
<recommendation>
<id>ipython.desktop</id>
<because>
<id>eric.desktop</id>
<id>winpdb.desktop</id>
</because>
</recommendation>
</recommendations>
Where the id tag would be the name of the package being recommended and the because tag would indicate which user packages generated the recommendation.
Currently, there is a MR open on the main AppStream repository with the code I have written:
https://github.com/ximion/appstream/pull/45Although my approach is currently working, there is still a lot of improvement that can be made upon it. For example, removing duplicated code and testing the behavior of my code if it receives an invalid XML file.
Therefore, my MR is mainly to collect upstream feedback on my approach and what can I do to improve it.
I have also continued the packaging of AppRecommender, which is now running both unit and package tests during the build. However, there is still some lintian warnings regarding some files on the web dir of AppRecommender.
If the recommended package found on the XML is not indexed by AppStream, the recommendation object should not be valid. I will implement this check on the feature that I am developing.
--
Lucas Moura