From 8268bd8f32cf216216a544beb051537a7c00de69 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 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; } -- cgit v1.2.1