diff options
author | Kalev Lember <klember@redhat.com> | 2017-01-03 18:50:19 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-01-17 10:36:20 +0000 |
commit | 8268bd8f32cf216216a544beb051537a7c00de69 (patch) | |
tree | 8c5f1a1203ca84f1efa1eeda9743bff281b86a30 | |
parent | 27ac3fd370c2ca64334b73b8ab8b2fdff50c37d6 (diff) | |
download | appstream-glib-8268bd8f32cf216216a544beb051537a7c00de69.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 efcef7a..dfbd289 100644 --- a/libappstream-builder/asb-context.c +++ b/libappstream-builder/asb-context.c @@ -1360,6 +1360,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; } |