diff options
author | Kalev Lember <klember@redhat.com> | 2017-01-09 15:06:32 +0100 |
---|---|---|
committer | Kalev Lember <klember@redhat.com> | 2017-01-09 17:07:46 +0100 |
commit | 836a6acbaf9e30e41511f1e82b017d4d543eb3c0 (patch) | |
tree | 9390231415d6b0a9b40c1a1bcb8b89587032a46c | |
parent | 8be3efa36165e8d30b591831a093c3524014c7c4 (diff) | |
download | appstream-glib-836a6acbaf9e30e41511f1e82b017d4d543eb3c0.tar.gz |
Limit recursive deps lookup to the same source package
Otherwise we may end up inadvertently marking an app as ModernToolkit
when all it does is require zenity.
-rw-r--r-- | libappstream-builder/asb-task.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c index 41e334d..bad6826 100644 --- a/libappstream-builder/asb-task.c +++ b/libappstream-builder/asb-task.c @@ -160,10 +160,16 @@ asb_task_get_extra_deps_recursive (AsbTask *task, return TRUE; if (!asb_package_ensure (subpkg, - ASB_PACKAGE_ENSURE_DEPS, - error)) + ASB_PACKAGE_ENSURE_DEPS | + ASB_PACKAGE_ENSURE_SOURCE, + error)) return FALSE; + /* check it's from the same source package */ + if (g_strcmp0 (asb_package_get_source (subpkg), + asb_package_get_source (priv->pkg)) != 0) + return TRUE; + subpkg_deps = asb_package_get_deps (subpkg); for (guint i = 0; i < subpkg_deps->len; i++) { const gchar *subpkg_dep = g_ptr_array_index (subpkg_deps, i); |