summaryrefslogtreecommitdiff
path: root/libappstream-builder/asb-task.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-01-04 14:24:36 +0000
committerRichard Hughes <richard@hughsie.com>2017-01-04 14:24:36 +0000
commitb04fb193dad0e6e977d9bda2487bd50075f8f61c (patch)
treeafd9d39e0b2aaa81265a829af6a3b0a1f63865a1 /libappstream-builder/asb-task.c
parent53761a4608131b3643c6e1701e9e676fdfdd3169 (diff)
downloadappstream-glib-b04fb193dad0e6e977d9bda2487bd50075f8f61c.tar.gz
trivial: Prevent recusion when a package lists itself as a dep
Diffstat (limited to 'libappstream-builder/asb-task.c')
-rw-r--r--libappstream-builder/asb-task.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c
index e7bcac6..78fb67f 100644
--- a/libappstream-builder/asb-task.c
+++ b/libappstream-builder/asb-task.c
@@ -168,6 +168,10 @@ asb_task_get_extra_deps_recursive (AsbTask *task,
for (guint i = 0; i < subpkg_deps->len; i++) {
const gchar *subpkg_dep = g_ptr_array_index (subpkg_deps, i);
+ /* same as the parent? */
+ if (g_strcmp0 (subpkg_dep, dep) == 0)
+ continue;
+
/* already processed? */
if (g_hash_table_lookup (extra_deps->results_hash, subpkg_dep) != NULL)
continue;