Git Product home page Git Product logo

appstream's People

Contributors

aleixpol avatar andibing avatar atalanttore avatar atriwidada avatar cheve11e avatar comradekingu avatar f2404 avatar fitojb avatar haaninjo avatar jakobdev avatar lumingzh avatar milocasagrande avatar milotype avatar oersen avatar p-bo avatar piotrdrag avatar pwithnall avatar rffontenelle avatar ryonakano avatar santossi avatar scootergrisen avatar ser82-png avatar svuorela avatar verytastytomato avatar vistaus avatar weblate avatar welaq avatar ximion avatar yurchor avatar zerng07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appstream's Issues

-DVAPI=ON fails with No rule to make target when using make %{?_smp_mflags}

[   91s] Scanning dependencies of target vapi
[   91s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/AppStream-0.9.2/build'
[   91s] make -f contrib/vapi/CMakeFiles/vapi.dir/build.make contrib/vapi/CMakeFiles/vapi.dir/build
[   91s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/AppStream-0.9.2/build'
[   91s] make[2]: *** No rule to make target 'src/AppStream-1.0.typelib', needed by 'contrib/vapi/appstream.vapi'.  Stop.

Do not use UNIX epochs as timestamps

UNIX epochs are a terrible way to specify a date and time, especially in a human readable and writable data format.

UNIX epochs have too high granularity for release metadata: I don't care if I released something less than a minute ago, and if something takes less than a second to release then something is clearly wrong. UNIX epochs have no actual size specified, so they could be loaded by 32 bit architectures or 64 bit ones; the AppStream API already has to use 64 bit wide unsigned integers to cope with this.

UNIX epochs do not have timezone information, as they are (generally, see below) relative to coordinate time; this means that I lose the timezone information of a release whenever I use the UNIX timestamp.

UNIX epochs are poorly defined, as there are a bunch of those - with leap seconds, without leap seconds, from UTC, from TAI, etc. You're basically encoding the behaviour of the date +%s command on your current OS whenever you use one.

Humans do not know how to write UNIX timestamps; you need an ancillary tool to write them and read them, thus introducing undeclared dependencies.

Humans have invented the ISO 8601 specification, which is what everyone should be using to represent dates and times (and intervals) inside exchange formats.

The <release/> tag in the release metadata should deprecate the timestamp attribute in favour of a new time attribute, which expresses the release time as an ISO 8601 string. The AppStream library API does not need to be modified, as it can convert to and from ISO 8601 dates transparently.

Missing mimetypes information

I was trying to make use of mimetypes from Discover UI, then I found it's not offered for any of the assets.

I'm not sure if it's actually no application offering it (then we should find out how to get them to) or whether it's the distribution not gathering the information properly.

Cheese being reported twice on appstream db

In this case we should only have the one coming from the distribution. I guess it's not detecting as the generated id is different?

This happens on ArchLinux.

Identifier: org.gnome.Cheese.desktop [desktop-application]
Name: Cheese
Summary: Take photos and videos with your webcam, with fun graphical effects
Package: cheese
Homepage: https://wiki.gnome.org/Apps/Cheese
Icon: cheese_org.gnome.Cheese.png
Description: Cheese uses your webcam to take photos and videos, applies fancy special effects 
  and lets you share the fun with others.

  Take multiple photos in quick succession with burst mode. Use the countdown to 
  give yourself time to strike a pose, and wait for the flash!

  Under the hood, Cheese uses GStreamer to apply fancy effects to photos and 
  videos. With Cheese it is easy to take photos of you, your friends, pets or whatever 
  you want and share them with others.
Default Screenshot URL: http://amigadave.com/temp/cheese-default.png
Project Group: GNOME
License: GPL-2.0+
Categories: 
 - AudioVideo
 - Video
 - Recorder

---
Identifier: org.gnome.Cheese [desktop-application]
Name: Cheese
Summary: Take photos and videos with your webcam, with fun graphical effects
Categories: 
 - AudioVideo
 - Video
 - Recorder

NULL pointer passed to as_checksum_set_value from as_cache_file_read

I was trying to reproduce another bug that I saw (couldn't, might be fixed with 0.10, will keep an eye out), when I made appstreamcli crash like this.

laney@raleigh> sudo env LD_LIBRARY_PATH=/dev/canonical/release/appstream/build/src gdb --args ~/dev/canonical/release/appstream/build/tools/appstreamcli refresh-cache --force 
GNU gdb (Ubuntu 7.11.90.20160824-0ubuntu2) 7.11.90.20160824-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/laney/dev/canonical/release/appstream/build/tools/appstreamcli...done.
(gdb) run
Starting program: /home/laney/dev/canonical/release/appstream/build/tools/appstreamcli refresh-cache --force
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(appstreamcli:18543): GLib-CRITICAL **: the GVariant format string '{us}' has a type of '{us}' but the given value has a type of 'a{sv}'

(appstreamcli:18543): GLib-CRITICAL **: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' failed

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0  0x00007ffff6f5af06 in strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff7b2fb43 in g_strdup (str=0x2 <error: Cannot access memory at address 0x2>) at ././glib/gstrfuncs.c:362
#2  0x00007ffff72c5a34 in as_checksum_set_value (cs=0x63a710 [AsChecksum], value=0x2 <error: Cannot access memory at address 0x2>) at /home/laney/dev/canonical/release/appstream/src/as-checksum.c:165
#3  0x00007ffff72b62f4 in as_cache_file_read (fname=0x62efd0 "/var/cache/app-info/gv/en_GB.gvz", error=0x7fffffffdec8)
    at /home/laney/dev/canonical/release/appstream/src/as-cache-file.c:1094
#4  0x00007ffff72c14cb in as_pool_load_cache_file (pool=0x62c870 [AsPool], fname=0x62efd0 "/var/cache/app-info/gv/en_GB.gvz", error=0x7fffffffdf98) at /home/laney/dev/canonical/release/appstream/src/as-pool.c:751
#5  0x00007ffff72c13c9 in as_pool_load (pool=0x62c870 [AsPool], cancellable=0x0, error=0x7fffffffdf98)
    at /home/laney/dev/canonical/release/appstream/src/as-pool.c:717
#6  0x00007ffff72c21ff in as_pool_refresh_cache (pool=0x62c870 [AsPool], force=1, error=0x7fffffffe000)
    at /home/laney/dev/canonical/release/appstream/src/as-pool.c:1167
#7  0x00000000004058f3 in ascli_refresh_cache (cachepath=0x0, datapath=0x0, forced=1)
    at /home/laney/dev/canonical/release/appstream/tools/ascli-actions-mdata.c:52
#8  0x000000000040435f in as_client_run (argv=0x7fffffffe3d8, argc=2)
    at /home/laney/dev/canonical/release/appstream/tools/appstream-cli.c:213
#9  0x000000000040469e in main (argc=3, argv=0x7fffffffe3d8)
    at /home/laney/dev/canonical/release/appstream/tools/appstream-cli.c:269

...I think it's because you are iterating the wrong dictionary.

refresh-cache doesn't cope well with broken symlinks in /var/lib/apt/lists

I somehow ended up with this - not sure if apt is supposed to guarantee that these are cleaned up if you switch mirrors in sources.list.

laney@yakkety-vm:~/temp$ sudo appstreamcli refresh-cache
[sudo] password for laney: 

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety_restricted_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-updates_main_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-updates_restricted_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-updates_universe_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-updates_multiverse_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-backports_main_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-backports_restricted_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-backports_universe_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety-backports_multiverse_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety_main_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety_universe_dep11_Components-amd64.yml.gz

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:6041): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:6041): WARNING **: No origin found for file _srv_mirrors_ubuntu_dists_yakkety_multiverse_dep11_Components-amd64.yml.gz
AppStream data pool was loaded, but some metadata was ignored due to errors.

It's because:

laney@yakkety-vm:~/temp$ ls -l /var/lib/apt/lists/_srv_mirrors_ubuntu_dists_yakkety_restricted_dep11_Components-amd64.yml.gz
lrwxrwxrwx 1 root root 74 Aug 31 11:17 /var/lib/apt/lists/_srv_mirrors_ubuntu_dists_yakkety_restricted_dep11_Components-amd64.yml.gz -> /srv/mirrors/ubuntu/dists/yakkety/restricted/dep11/Components-amd64.yml.gz
laney@yakkety-vm:~/temp$ ls -l /srv/mirrors/ubuntu/dists/yakkety/restricted/dep11/Components-amd64.yml.gz
ls: cannot access '/srv/mirrors/ubuntu/dists/yakkety/restricted/dep11/Components-amd64.yml.gz': No such file or directory

Index third party apps that do not ship as.xml data

Use case:
User goes to skype.com, viber.com dowloads their debs, install them, some time later willing to clean up stuff and not a user of skype/viber/chrome/whatever opens the software center and looks for installed apps, it will not be in the applications section.

These debs are not in any local repo and even it they where the provider might change the package name at anytime, we can´t make these companies to provide as.xml data.

My idea would be calling packagekit with getPackages(Application|Installed), and if their packages is not in the index yet index the .desktop files

Seg fault on multiple calls to find_components()

After upgrading to newer versions of appstream (0.9.7-1 and now 0.9.8-1 on ubuntu 16.10), I am getting consistent crashes when calling find_components consecutively from python3. This script dumps for me every time:

#!/usr/bin/env python

import gi
gi.require_version('AppStream', '1.0')
from gi.repository import AppStream

db = AppStream.Database()
db.open()

db.find_components("gedit", None) # Fine, continue...
db.find_components("gedit", None) # Crash!

The results:

./break_appstream.py:11: Warning: invalid unclassed pointer in cast to 'AsComponent'
  db.find_components("gedit", None) # Crash!
**
GLib:ERROR:/build/glib2.0-4NbKb8/glib2.0-2.49.2/./glib/ghash.c:373:g_hash_table_lookup_node: assertion failed: (hash_table->ref_count > 0)
Aborted (core dumped)

Am I using this incorrectly? I've tried running appstreamcli refresh --force --verbose and seen nothing interesting. I've reproduced this exact issue on another machine. I tested on a machine with ubuntu 16.04 and found that version 0.9.4-1ubuntu1 still works as expected.

Document how to use the bundle tag

Thanks for adding the bundle tag and for adding AppImage support.

Please document the best practices for how the bundle tag should be used. I try to summarize what I understood from our earlier conversation, feel free to correct me:

  • The bundle tag is not supposed to be added to usr/share/metainfo/$ID.appdata.xml files but is added to collection data (a.k.a. distro metadata) by a compose server (e.g., operated by a distribution or app store). If upstream adds the bundle tag to usr/share/metainfo/$ID.appdata.xml anyway it is likely to be removed by the compose server
  • The compose server has to get the information from upstream. Upstream can submit it to the compose server by either placing a file in a special format (still to be defined) into a upstream-provided directory; or by using an upload tool (still to be written) that submits the data to the compose server; or by manually enter the information into a web interface of the compose server (to be written)
  • It is not allowed to have sub-tags inside the <bundle> tag. This is to allow for easier verification and deserialization. But it is possible to have more than one <bundle> tag, even for the same bundling format (this is useful when an upstream wants to provide different channels like stable, weekly, daily, continuous, canary, aurora, etc.)

API assumes there's one of each appstream id

With the introduction of bundles, it becomes possible to have several versions of the same software available in the system.

API such as:

AsComponent *as_data_pool_get_component_by_id (AsDataPool *dpool, const gchar *id);

Should be returning a list of components. AFAIU.
If we want to have calls to a specific component, we'll have to add more arguments otherwise. If possible.

as_icon should have a uniform url getter

as_icon currently forces a differentiation on the API user with regards to whether an icon is local or remote. Chances are the API user won't care if her language/framework can handle all possible URI schemes including file://.

There should be a way to enable convenient uniform URL handling regardless of whether a file is local or remote, possibly by making as_icon_get_url always return something.

Assuming the API user can understand file:// this allows the user to only use a single function without branching. Right now one always needs to special case local files and check as_icon_get_filename as well as as_icon_get_url, even when one could just handle them all the same.

e.g. in Ruby I need the following to open an icon resource

icon = component.icons.index(0)
open(icon.filename ? icon.filename : icon.url)
# NB: without ternary this would be between 4 and 5 lines (or more... think Go ;))

same code with uniform getter

open(component.icons.index(0).url) # Could be file://var/yolo/whatever.png

screenshot URL from appdata is ignored

In org.kde.dolphin.appdata.xml there's

  <screenshots>
    <screenshot type="default">
      <image>http://kde.org/images/screenshots/dolphin.png</image>
    </screenshot>
  </screenshots>

In the distro appdata database, in the dolphin component:

  <screenshots>
    <screenshot type="default"><caption/><image type="source">http://kde.org/images/screenshots/dolphin.png</image></screenshot>
  </screenshots>

However, after refreshing the cache:

> sudo appstreamcli refresh-index --force
> appstreamcli search dolphin --details
...
Sample Screenshot URL: http://screenshots.debian.net/screenshot/dolphin
...

Some applications use outdated icons in AppStream

We have noticed that for example many KDE applications still use outdated icons (Oxygen or even older) in AppStream, whereas the default icon theme they themselves (and Plasma) use is Breeze.

Can we only fix this by filing a bug for every application, or is there a way to ensure icons from the current theme are used for AppStream in general?

Sorting is not prefering name matches

For example, looking for writer doesn't prioritize libreoffice writer.over calligra author.

$ appstreamcli search writer
Identifier: gco.desktop [desktop]
Name: GNOME Comics Organizer
Summary: A GNOME interface for managing your comic book collection
Package: gco
Icon: gco_gco-gco.png
----
Identifier: author.desktop [desktop]
Name: Calligra Author
Summary: Write ebooks and textbooks
Package: calligraauthor
Icon: calligraauthor_calligraauthor.png
----
Identifier: org.gnome.MultiWriter.desktop [desktop]
Name: MultiWriter
Summary: Write an ISO file to multiple USB devices at once
Package: gnome-multi-writer
Homepage: https://wiki.gnome.org/Apps/MultiWriter
Icon: gnome-multi-writer_gnome-multi-writer.png
----
Identifier: libreoffice-writer.desktop [desktop]
Name: LibreOffice Writer
Summary: Create and edit text and graphics in letters, reports, documents and Web pages by using Writer.
Package: libreoffice-writer
Homepage: http://www.libreoffice.org/discover/writer/
Icon: libreoffice-writer_libreoffice-writer.png
----

Appstream crashes with a short search

$ appstreamcli search ka
**
ERROR:/home/apol/devel/frameworks/appstream/src/as-data-pool.c:1024:as_data_pool_search: assertion failed: (terms)
Aborted (core dumped)

as_utils_search_token_valid returns null if the string is too short. I'd say it's ok to restrict broad searches, but I'd rather limit it from the frontend.

Error reading fwupd appinfo

Hi ximion! Hope you got back okay

fwupd's appinfo can't be read by appstream currently. In sid (install fwupd and appstream, then apt-get update):

(sid-amd64)root@nightingale:/# appstreamcli refresh-index --force --verbose
** (appstreamcli:5971): DEBUG: Refreshing AppStream cache
** (appstreamcli:5971): DEBUG: Reading: /usr/share/app-info/xmls/org.freedesktop.fwupd.xml
** (appstreamcli:5971): DEBUG: WARNING: Invalid component: [Component::UEFI-dummy-dev0]> name: UEFI Updates | package: ? | summary: Enable UEFI Update Functionality
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_non-free_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_main_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_contrib_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Detected colliding ids: flcheckers.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: flsudoku.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: flblocks.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: emacs24-term.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: zathura-pdf-poppler.desktop extends zathura.desktop, but zathura.desktop was not found.
** (appstreamcli:5971): DEBUG: Removing old rebuild-dir from previous database rebuild.
AppStream cache update completed, but some metadata was ignored due to errors.

If you delete the first component then the warning just moves to the next one.

I assume this is going to break firmware updates?

"Validation failed" for addons without long description

How to reproduce: Use the example file for addons and remove zero-width spaces at the start of each line (snafu of a different project), yielding:

<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
  <id>gedit-code-assistance</id>
  <extends>gedit.desktop</extends>
  <name>Code Assistance</name>
  <summary>Code assistance for C, C++ and Objective-C</summary>
  <url type="homepage">http://projects.gnome.org/gedit</url>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
</component>

Then, try to validate the file.

Expected behavior: reference implementation validator and example in documentation agree on what is considered "correct", and the file passes validation.

Actual behavior (where ./appstreamcli is freshly built from master):

$ appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.0
$ appstreamcli validate /tmp/as.xml 
Validierung fehlgeschlagen.
$ ./appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.2
$ ./appstreamcli validate /tmp/as.xml 
E - as.xml:gedit-code-assistance
    The component is missing a long description. Components of this type must have a long description.

Validierung fehlgeschlagen.

So, who is right? The documentation clearly doesn't mention description as required:

For a component of type addon, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <extends/>. 

EDIT: This isn't add-on specific. The "example for a very basic component" doesn't have a description, either.

EDIT 2: Tested 0.9.1 on a different system

$ appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.1
$ appstreamcli validate --pedantic telegram-purple.metainfo.xml 
Validierung fehlgeschlagen.

metadata recommendations for themes

In "app store" environments like Android, customized UI themes are a fairly popular category of user-installable component. Free desktops have two main types of theme:

plus some more minor ones (Debian has a couple of sound themes and a few cursor themes).

Is AppStream an appropriate way to describe these theme packages?

  • Themes should maybe have their own type, unless they are considered to be an addon to something (what?)
  • Icon themes should maybe be their own top-level <provides>, like <provides><icon-theme>Numix-Light</></>?
  • The various other kinds of theme often go together as a group to give multiple toolkits and packages a coherent look, so maybe <provides><theme types="cinnamon gnome-shell gtk-2.0 gtk-3.0 metacity-1 plank unity xfwm4">Arc</></> or something?

Crash when opening the database

I fixed the db lookup bug, it was due to having 2 libappstream.so on the system, it worked by specifying the LD_LIBRARY_PATH (without using sudo).

Now, with the proper libraries, I get such a crash when opening the db.

$ gdb --args appstreamcli search kalgebra
Reading symbols from appstreamcli...done.
(gdb) r
Starting program: /home/kde-devel/kde5/bin/appstreamcli search kalgebra
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

Program received signal SIGABRT, Aborted.
0x00007ffff60445f8 in raise () from /usr/lib/libc.so.6
(gdb) where
#0  0x00007ffff60445f8 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff6045a7a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff4e53b3d in __gnu_cxx::__verbose_terminate_handler () at /build/gcc/src/gcc-5.2.0/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007ffff4e51996 in __cxxabiv1::__terminate (handler=<optimized out>) at /build/gcc/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007ffff4e519e1 in std::terminate () at /build/gcc/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x00007ffff4e51bf8 in __cxxabiv1::__cxa_throw (obj=obj@entry=0x637690, tinfo=0x7ffff5138aa8 <typeinfo for std::invalid_argument>, 
    dest=0x7ffff4e67140 <std::invalid_argument::~invalid_argument()>) at /build/gcc/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_throw.cc:87
#6  0x00007ffff4e7a9df in std::__throw_invalid_argument (__s=0x7ffff6fe5ed9 "stoi") at /build/gcc/src/gcc-5.2.0/libstdc++-v3/src/c++11/functexcept.cc:82
#7  0x00007ffff6fcb8c2 in __gnu_cxx::__stoa<long, int, char, int> (__convf=0x7ffff60482a0 <strtoq>, __name=0x7ffff6fe5ed9 "stoi", 
    __str=0x7ffff5145218 <std::string::_Rep::_S_empty_rep_storage+24> "", __idx=0x0) at /usr/include/c++/5.2.0/ext/string_conversions.h:65
#8  0x00007ffff6fcb759 in std::stoi (__str="", __idx=0x0, __base=10) at /usr/include/c++/5.2.0/bits/basic_string.h:5258
#9  0x00007ffff6fc79a5 in DatabaseRead::open (this=0x629670, dbPath=0x6296b0 "/var/cache/app-info/xapian/default")
    at /home/kde-devel/frameworks/appstream/src/xapian/database-read.cpp:66
#10 0x00007ffff6fd1009 in xa_database_read_open (db=0x629670, db_path=0x6296b0 "/var/cache/app-info/xapian/default")
    at /home/kde-devel/frameworks/appstream/src/xapian/database-cwrap.cpp:33
#11 0x00007ffff6fdbfa6 in as_database_real_open (db=0x62a020) at /home/kde-devel/frameworks/appstream/src/as-database.c:105
#12 0x00007ffff6fdc011 in as_database_open (db=0x62a020) at /home/kde-devel/frameworks/appstream/src/as-database.c:117
#13 0x0000000000404257 in ascli_search_component (dbpath=0x0, search_term=0x7fffffffe7bb "kalgebra", detailed=0) at /home/kde-devel/frameworks/appstream/tools/ascli-mdata-actions.c:157
#14 0x0000000000403244 in as_client_run (argv=0x7fffffffe468, argc=3) at /home/kde-devel/frameworks/appstream/tools/appstream-cli.c:151
#15 0x0000000000403482 in main (argc=3, argv=0x7fffffffe468) at /home/kde-devel/frameworks/appstream/tools/appstream-cli.c:199

Some applications are missing on Ubuntu 16.04

After figuring out the issue #37, now I don't get some applications:

$ appstreamcli search kate
Identifier: frescobaldi.desktop [desktop]
Name: Frescobaldi
Summary: LilyPond Music Editor
Package: frescobaldi
Icon: frescobaldi_frescobaldi.png
----

Icons missing

Appstream doesn't provide a firefox icon:

$ appstreamcli get firefox.desktop --details
Identifier: firefox.desktop [desktop]
Name: Firefox Web Browser
Summary: Browse the World Wide Web
Package: firefox
Sample Screenshot URL: http://screenshots.ubuntu.com/screenshot/firefox
Categories: GNOME, GTK, Network, WebBrowser, 
Provided Items: ↓
 Mimetypes: 
  image/gif text/xml application/rdf+xml
  image/jpeg application/xml text/html application/rss+xml x-scheme-handler/http video/webm
  x-scheme-handler/ftp image/png application/xhtml+xml application/x-xpinstall x-scheme-handler/https
  x-scheme-handler/chrome

But gnome-software does show one.

Tested on Kubuntu 16.04.

Backport to debian oldstable

Would it be possible to backport the continuous build to something like precise, CentOS 6, or debian oldstable, so that we could point people there? Right now, the appstreamcli version coming with distribution is outdated almost all of the time, giving false results (example).

By providing a backport, the resulting deb/rpm would be expected to run almost everywhere. I could even make an AppImage for it, bundling it with the required libraries.

Displaying suggested packages

At the moment the spec offers addons, which are components that directly target another component. Sometimes though we have suggested dependencies, something that isn't necessary but recommended, as you very well known it's done in distros. These suggested dependencies should be displayed in software centers: you want to offer cmake together with KDevelop (https://packages.debian.org/jessie/kdevelop)

Do you think it's possible to extend the appstream spec to define these dependencies?
AppStream could also use the packaging information for the final information passed to the Software Centers as well.

appstream:/id URL handler

It would be really useful to have such a URL handler so that if the user clicks a URL with "appstream:" scheme, he launches Discover/Gnome-Software/Whatever.

This could help a lot minimize the access barrier to the projects we offer since we'd be leveraging a cross-distro naming scheme, therefore not compromising when giving a package name (like it used to be done with apt:/).

Fails to compile on Ubuntu 16.04

Trying to compile on Ubuntu 16.04:

sudo apt install cmake libglib2.0-dev libxml2-dev libyaml-dev gobject-introspection
git clone https://github.com/ximion/appstream.git
cd appstream/
mkdir build
cd build
cmake -DSTEMMING=OFF ..

-- Compiling AppStream version 0.10.2
-- Checking for module 'gobject-introspection-1.0'
--   No package 'gobject-introspection-1.0' found
CMake Error at src/CMakeLists.txt:24 (message):
  GObject introspection scanner was not found! Please install it to continue.

Is the gobject-introspection package not the correct one?

AppStream Button

Some time ago we started discussing about the appstream://id scheme.

Then I discussed with our Visual Design Group that it might be interesting to have a button that we can use to indicate that a button leads to an AppStream URI (from a website, although it might make sense on applications as well).

Here's what @Ken-Vermette came up with, and I think it's an interesting approach:
https://share.kde.org/index.php/s/MPpOOEl7JpGAWzu/download

Do you think it would make sense?

Provide different DPI for the icons

Currently the specification doesn't mention anything related to DPI support.
It seems that people are wrongly using the 128px icons for the 64@2 icons but they are not the same icons.
Here are more explicit informations about this problem:
http://blog.elementary.io/post/124193007916/whats-up-with-hidpi-icons
To solve this problem i propose to allow a dpi property that way:

<icon type="remote" width="64" height="64">http://example.com/icons/foobar.png</icon>
<icon type="remote" width="64" height="64" dpi="2">http://example.com/icons/[email protected]</icon>

The default dpi value should be 1 so it's not mandatory to set it.

0.10 doesn't provide screenshot url info

With 0.10, 'appstream-cli get --details' doesn't provide a screenshot url anymore. The data has been extracted with "createScreenshotsStore": false and screenshot urls are available in the app-info xmls.

appstream-0.8.4 missing all metadata (on fedora 23)?

Subject says it all, not sure if it's fedora 23 or appstream-0.8.4 (or both) to blame here, but either way, neither muon-discover or appstreamcli seems to find anyting. :(

$ sudo appstreamcli refresh-index --force --verbose
** (appstreamcli:31236): DEBUG: Unable to determine screenshot service for distribution 'Fedora'. Using the Debian services.
** (appstreamcli:31236): DEBUG: Data did not change, no cache refresh needed.
** (appstreamcli:31236): DEBUG: Forcing refresh anyway.
** (appstreamcli:31236): DEBUG: Refreshing AppStream cache
** (appstreamcli:31236): DEBUG: An unknown component was found: webapp
** (appstreamcli:31236): DEBUG: ASXML-WARNING: Invalid component: [Component::devdocs-io.desktop]> name: Devdocs.io | package: | summary: Easily view and search developer documentation
** (appstreamcli:31236): DEBUG: Removing old rebuild-dir from previous database rebuild.
AppStream cache update completed, but some metadata was ignored due to errors.

$ appstreamcli search kde
No component matching 'kde' found.

I'm hoping the debug output above may give some clues. I'd really like to ship fedora 23 kde spin using muon, provided we can get it to work.

"Optional" dependency is required

In README.md, it says:

#### Optional
 * Vala Compiler (vapigen) (for Vala VAPI file)
 * libyaml (for DEP-11 support)

However, cd build && cmake .. doesn't work without yaml-dev in place:

-- Checking for module 'yaml-0.1'
--   Package 'yaml-0.1' not found
CMake Error at /usr/share/cmake-3.4/Modules/FindPkgConfig.cmake:360 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.4/Modules/FindPkgConfig.cmake:522 (_pkg_check_modules_internal)
  src/CMakeLists.txt:86 (pkg_check_modules)

I can see two ways to resolve this:

  • Make it a required dependency
  • Let it stay an optional dependency, and extend the line by something like Run cmake --no-yaml to build without this.

Refresh hangs

I have a third-party Ubuntu repo at http://packages.sil.org/ubuntu. I'm using a Xenial test machine. After refreshing sources with apt-get update, I run appstreamcli as follows:

sudo tools/appstreamcli refresh --force --verbose --details

It then hangs, using 100% CPU. I've left it as long as 10 minutes and it still doesn't finish. The output is:

** (appstreamcli:13992): DEBUG: Refreshing AppStream cache
** (appstreamcli:13992): DEBUG: Reading: /usr/share/app-info/xmls/org.freedesktop.fwupd.xml
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-updates_main_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-security_main_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-security_universe_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/archive.ubuntu.com_ubuntu_dists_xenial-security_multiverse_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/packages.sil.org_ubuntu_dists_xenial_main_dep11_Components-amd64.yml.gz
** (appstreamcli:13992): DEBUG: Reading: /var/lib/app-info/yaml/packages.sil.org_ubuntu_dists_xenial_universe_dep11_Components-amd64.yml.gz

If I run it from a root shell (sudo -s) or wrap it with a shell (sudo bash -c '...') I get the same result. Previously, it would run successfully like this, but the behaviour has now changed. The only difference I can think of is that I've installed build dependencies for appstream and have built it from source. However, I haven't done make install and it doesn't matter whether I run the built-from-source version or the installed package.

Very annoyingly, if I try to run appstreamcli from gdb, it runs successfully! So I can't step through the code and see exactly what's happening. Instead, I'm having to rely on creating a core dump, and because it's being run from a set-uid program, I have to set /proc/sys/fs/suid_dumpable and /proc/sys/kernel/core_pattern appropriately. I can then use ^\ to send SIGQUIT and use gdb on the resulting core dump.

I get the following backtrace:

#0  0x00007f912e1a18b4 in yaml_event_delete () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
#1  0x00007f912fa767e0 in as_yamldata_parse_distro_data (ydt=0x1612d20, 
    data=0x1712580 "---\nFile: DEP-11\nVersion: '0.8'\nOrigin: pso-ubuntu-xenial-universe\nMediaBaseUrl: http://packages.sil.org/ubuntu/appstream/media\n\360\273p\001", error=0x7ffff1342c20) at /home/mayhewn/src/appstream/appstream/src/as-yamldata.c:1932
#2  0x00007f912fa77063 in as_metadata_parse_yaml (metad=0x161ed40, 
    data=0x1712580 "---\nFile: DEP-11\nVersion: '0.8'\nOrigin: pso-ubuntu-xenial-universe\nMediaBaseUrl: http://packages.sil.org/ubuntu/appstream/media\n\360\273p\001", error=0x7ffff1342c20) at /home/mayhewn/src/appstream/appstream/src/as-metadata.c:255
#3  0x00007f912fa77486 in as_metadata_parse_file (metad=0x161ed40, file=0x1619d40, error=0x7ffff1342c20)
    at /home/mayhewn/src/appstream/appstream/src/as-metadata.c:357
#4  0x00007f912fa7cc2b in as_data_pool_load_metadata (dpool=0x1612c80) at /home/mayhewn/src/appstream/appstream/src/as-data-pool.c:465
#5  0x00007f912fa7ce29 in as_data_pool_update (dpool=0x1612c80, error=0x7ffff1342d00)
    at /home/mayhewn/src/appstream/appstream/src/as-data-pool.c:512
#6  0x00007f912fa6c76b in as_cache_builder_refresh (builder=0x1612c30, force=0, error=0x7ffff1342d78)
    at /home/mayhewn/src/appstream/appstream/src/as-cache-builder.c:537
#7  0x0000000000405114 in ascli_refresh_cache (dbpath=0x0, datapath=0x0, forced=0)
    at /home/mayhewn/src/appstream/appstream/tools/ascli-actions-mdata.c:61
#8  0x0000000000403d61 in as_client_run (argv=0x7ffff1343128, argc=2) at /home/mayhewn/src/appstream/appstream/tools/appstream-cli.c:202
#9  0x000000000040405b in main (argc=4, argv=0x7ffff1343128) at /home/mayhewn/src/appstream/appstream/tools/appstream-cli.c:255

The content of /var/lib/app-info/yaml/packages.sil.org_ubuntu_dists_xenial_universe_dep11_Components-amd64.yml.gz is:

---
File: DEP-11
Version: '0.8'
Origin: pso-ubuntu-xenial-universe
MediaBaseUrl: http://packages.sil.org/ubuntu/appstream/media

It looks like as_metadata_parse_yaml is being given some extra junk characters on the end of the real data (\360\273p\001). These are definitely not in the real file (I checked with zcat ... | hexdump -C).

The output of ldd tools/appstreamcli is:

    linux-vdso.so.1 =>  (0x00007ffe1313f000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f0869571000)
    libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f08691e8000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f0868f95000)
    libappstream.so.3 => /home/mayhewn/src/appstream/appstream/build/src/libappstream.so.3 (0x00007f0868d22000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0868958000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f08686e8000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08684cb000)
    libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f08682c6000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f08680ac000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f0867e8a000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f0867c6e000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f0867a66000)
    libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f08676ac000)
    libyaml-0.so.2 => /usr/lib/x86_64-linux-gnu/libyaml-0.so.2 (0x00007f086748c000)
    libxapian.so.22 => /usr/lib/x86_64-linux-gnu/libxapian.so.22 (0x00007f0867090000)
    libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9 (0x00007f0866e5f000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0866adc000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08668c6000)
    /lib64/ld-linux-x86-64.so.2 (0x00005635c4a6a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f08666c2000)
    libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f086632d000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f086610b000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0865e02000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f0865bfc000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f0864145000)

So it's picking up system libraries for everything except libappstream.so.3, as it should.

Database is not found

Recently it was changed to look for the database in /default instead of /C. This breaks on my system. Reverting the commit 9426db0a96b24fdcc85c895cc97a1a18699620d7 fixed the issue for me.

Maybe because I'm not running appstream-glib master?
AppStream CLI tool version: 0.8.5

core dump on ubuntu 16.04 64bit

When I run the apt update on the ubuntu 16.04 64bit, the appstream get a core dump without push CPU to 100% . To get the update I have to remove the appstream. I already tried the wget way to get
the new appstream , but it still get core dump . The core dump shows it is a segmention fault
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache /app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'

appstreamcli wants to install to non-existent directory

On Ubuntu 16.04 LTS:

$ sudo appstreamcli put /home/me/Desktop/krita.appdata.xml 
Unable to write to '/usr/share/metainfo', can not install metainfo file.
$ ls /usr/share/metainfo
ls: cannot access '/usr/share/metainfo': No such file or directory

# Workaround:
$ sudo mkdir /usr/share/metainfo
$ sudo appstreamcli put /home/me/Desktop/krita.appdata.xml 
$ ls /usr/share/metainfo
krita.appdata.xml

But not sure if the information is picked up from /usr/share/metainfo.

0.9.2 fails to build

I'm unfamiliar with gobject-introspection and thus unsure how to find out what's wrong or even fix this build error with 0.9.2:

[ 21%] �[34m�[1mGenerating AppStream-1.0.gir�[0m
cd /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/build/src && /usr/x86_64-pc-linux-gnu/bin/g-ir-scanner --identifier-prefix=As --symbol-prefix=as --warn-all --add-include-path=/var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src --namespace=AppStream --nsversion=1.0 --no-libtool --library=appstream --include=GObject-2.0 --include=Gio-2.0 --pkg-export=appstream --c-include appstream.h -I/var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/ -DAS_COMPILATION /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-utils.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-cache-builder.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-xmldata.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-yamldata.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-metadata.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-component.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-enums.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-provided.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-data-pool.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-database.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-category.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-menu-parser.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-distro-details.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-screenshot.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-image.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-release.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-validator.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-validator-issue.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-icon.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-translation.c /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/appstream.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-utils.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-metadata.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-component.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-data-pool.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-enums.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-provided.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-database.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-category.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-menu-parser.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-distro-details.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-screenshot.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-image.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-release.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-validator.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-validator-issue.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-icon.h /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/AppStream-0.9.2/src/as-translation.h --output /var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/build/src/AppStream-1.0.gir
AppStream-0.9.2/src/as-cache-builder.c:123: Warning: AppStream: unknown annotation: default
ERROR: can't resolve libraries to shared libraries: appstream
src/CMakeFiles/gir-girs.dir/build.make:101: recipe for target 'src/AppStream-1.0.gir' failed
make[2]: *** [src/AppStream-1.0.gir] Error 1
make[2]: Leaving directory '/var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/build'
CMakeFiles/Makefile2:161: recipe for target 'src/CMakeFiles/gir-girs.dir/all' failed
make[1]: *** [src/CMakeFiles/gir-girs.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/paludis/build/dev-libs-appstream-0.9.2/work/build'
Makefile:141: recipe for target 'all' failed
make: *** [all] Error 2

Full log: http://dpaste.com/29QKDBH.txt

Component::iconUrl disfunctional on AppStreamQt

This is the current code to fetch the iconUrl:

// Icon urls
    QString concatIconUrlStrings = value(document, XapianValues::ICON_URLS);
    QStringList iconUrlStrings = concatIconUrlStrings.split('\n',QString::SkipEmptyParts);
    if(iconUrlStrings.size() %2 == 0) {
        for(int i = 0; i < iconUrlStrings.size(); i=i+2) {
            QString sizeStr = iconUrlStrings.at(i);
            QUrl url = QUrl::fromUserInput(iconUrlStrings.at(i+1));
            QSize size = parseSizeString(sizeStr);
            component.addIconUrl(url, size);
        }
    } else {
        qCWarning(APPSTREAMQT_DB, "Bad icon-url strings for component: '%s' (%s)", qPrintable(id), qPrintable(concatIconUrlStrings));
    }

I suspect the format has changed internally and the code in Qt side isn't working anymore. Any pointers of how to fix it will be very welcome, in order to get a proper fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.