ximion / appstream

Tools and libraries to work with AppStream metadata
http://www.freedesktop.org/wiki/Distributions/AppStream/
GNU Lesser General Public License v2.1
211 stars 115 forks source link

No icons when loading from the cache #124

Closed aleixpol closed 7 years ago

aleixpol commented 7 years ago

Since a couple of weeks I've been getting only the icons for the components that have stock icons, those that have it bundled aren't being offered.

I've been investigating a bit and my distro's icons are part of the xml and they're properly parsed when we call appstreamcli refresh but then when it's loaded back into the pool it doesn't list them.

ximion commented 7 years ago

Which version of AppStream are you using? I fixed a bug that sounds exactly like yours a couple of days ago (https://github.com/ximion/appstream/commit/a83f1f55aa98deaeb6b0ba786027b9ff42712081), but that particular issue was only introduced in Git master, and never made it into a release.

aleixpol commented 7 years ago

I was testing on master, just switched to the APPSTREAM_0_11_2 and I have the same problem. In fact I don't see much differences between the tag and master.

ximion commented 7 years ago

Run a forced update please (appstreamcli refresh --force --verbose) and paste the log somewhere. Also check if the icon files are present. This bug is a rather strong indication for AS not finding the cached icons for some reason, just like with the bug I fixed in master.

aleixpol commented 7 years ago
** (appstreamcli:14437): DEBUG: Added /usr/share/app-info/xmls to metadata search path.
** (appstreamcli:14437): DEBUG: Added /var/cache/app-info/xmls to metadata search path.
** (appstreamcli:14437): DEBUG: Data did not change, no cache refresh needed.
** (appstreamcli:14437): DEBUG: Forcing refresh anyway.
** (appstreamcli:14437): DEBUG: Refreshing AppStream cache
** (appstreamcli:14437): DEBUG: Searching for data in: /usr/share/app-info/xmls
** (appstreamcli:14437): DEBUG: Searching for data in: /var/cache/app-info/xmls
** (appstreamcli:14437): DEBUG: Reading: /usr/share/app-info/xmls/org.freedesktop.fwupd.xml
** (appstreamcli:14437): DEBUG: Reading: /usr/share/app-info/xmls/extra.xml.gz
** (appstreamcli:14437): DEBUG: Reading: /usr/share/app-info/xmls/core.xml.gz
** (appstreamcli:14437): DEBUG: Reading: /usr/share/app-info/xmls/community.xml.gz
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/libreoffice-writer.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/libreoffice-calc.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/libreoffice-base.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/libreoffice-impress.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/libreoffice-draw.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: Metadata ignored: Detected colliding ids: system/os/package/yabause.desktop was already added with the same priority.
** (appstreamcli:14437): DEBUG: system/os/package/vim-latex extends system/os/package/gvim.desktop, but system/os/package/gvim.desktop was not found.
** (appstreamcli:14437): DEBUG: system/os/package/zathura-pdf-poppler.desktop extends system/os/package/zathura.desktop, but system/os/package/zathura.desktop was not found.
** (appstreamcli:14437): DEBUG: system/os/package/nautilus-sendto extends system/os/package/nautilus.desktop, but system/os/package/nautilus.desktop was not found.
** (appstreamcli:14437): DEBUG: Stemming language is: en
ximion commented 7 years ago

Is that the whole log? Because the log doesn't look complete... I'll fetch the Arch metadata and try a local cache rebuild with that exact data to try to reproduce the issue when I'm home.

aleixpol commented 7 years ago

That's on Arch Linux.

ximion commented 7 years ago

This should be working with the patch linked above - there was indeed an error in how/where the document context was set.

Actually, this issue is rather serious, so I might do another release very soon that includes this patch (at Debconf, I guess, I don't think I can manage to do one next Monday). Please check if this patch fixes the bug for you!

aleixpol commented 7 years ago

Yes, sorry for reopening. Fix confirmed. Had to refresh the db.