From a7387890b436d7fbaaa46f88e29486b761b0b4b4 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 3 Jan 2017 18:50:19 +0100 Subject: 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. --- libappstream-builder/asb-context.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.1