diff options
author | Kalev Lember <klember@redhat.com> | 2017-01-03 18:50:19 +0100 |
---|---|---|
committer | Kalev Lember <klember@redhat.com> | 2017-01-03 18:54:58 +0100 |
commit | a7387890b436d7fbaaa46f88e29486b761b0b4b4 (patch) | |
tree | 23b285ac36942059e16bbebe2cef31aa8f647a26 | |
parent | 8fb8ec0deb71ee2b49ecfe6718272896a28694c9 (diff) | |
download | appstream-glib-a7387890b436d7fbaaa46f88e29486b761b0b4b4.tar.gz |
Fix dep extraction when multiple versions are available
When looking up extra deps by pkgname, make sure to get the latest
version that matches with what the rest of the code expects.
This fixes libreoffice disappearing from appstream data when there's one
version of libreoffice-data available in the base repo and another one
from updates.
-rw-r--r-- | libappstream-builder/asb-context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libappstream-builder/asb-context.c b/libappstream-builder/asb-context.c index ce37895..b22de61 100644 --- a/libappstream-builder/asb-context.c +++ b/libappstream-builder/asb-context.c @@ -1361,6 +1361,8 @@ asb_context_find_by_pkgname (AsbContext *ctx, const gchar *pkgname) for (i = 0; i < priv->packages->len; i++) { pkg = g_ptr_array_index (priv->packages, i); + if (!asb_package_get_enabled (pkg)) + continue; if (g_strcmp0 (asb_package_get_name (pkg), pkgname) == 0) return pkg; } |