[odrs-web/oscp] Never try to adopt a component to itself



commit 26dbb82cad1dc9091cc92bf6e689c58e47194272
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 5 16:37:37 2019 +0100

    Never try to adopt a component to itself

 app_data/cron.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/app_data/cron.py b/app_data/cron.py
index c69e1f2..1d1483f 100755
--- a/app_data/cron.py
+++ b/app_data/cron.py
@@ -82,6 +82,8 @@ def _appstream_import(fn):
             children = []
             for provide in component.xpath('provides/id'):
                 child_id = provide.text
+                if child_id == app_id:
+                    continue
                 if child_id not in app_ids:
                     continue
                 if app_ids[child_id].component_id_parent:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]