[entities] quick fix to restore compatibility with forge 1.13 (closes #16812278) draft
authorDavid Douard <david.douard@logilab.fr>
Thu, 22 Dec 2016 12:14:25 +0100
changeset 1868 64d8949910f2
parent 1867 a3860aa1e1e0
child 1871 980e20892562
[entities] quick fix to restore compatibility with forge 1.13 (closes #16812278) This is only a quick fix, a far more extensive refactoring should be done to remove all the code that have been ed facto killed by droping "uses" and "recommends" relations.
entities.py
--- a/entities.py	Thu Dec 22 11:59:42 2016 +0100
+++ b/entities.py	Thu Dec 22 12:14:25 2016 +0100
@@ -160,31 +160,13 @@
         return self.refined_relation('local_repository')
 
     def dependencies(self, _done=None):
-        if _done is None:
-            _done = set()
-        _done.add(self.eid)
-        result = []
-        if self.project:
-            # XXX include recommends?
-            for dp in chain(self.project.uses, self.project.recommends):
-                # use getattr since for instance ExternalProject has no apycot
-                # environment relation
-                for dpe in getattr(dp, 'has_apycot_environment', ()):
-                    if dpe.eid in _done:
-                        continue
-                    result.append(dpe)
-                    result += dpe.dependencies(_done)
-        return result
+        # XXX to kill
+        return []
 
     # XXX no reverse dependencies without tracker
     def reverse_dependencies(self):
-        result = []
-        if self.project:
-            for dp in chain(self.project.reverse_uses,
-                            self.project.reverse_recommends):
-                for dpe in getattr(dp, 'has_apycot_environment', ()):
-                    result.append(dpe)
-        return result
+        # XXX to kill
+        return []
 
     def all_configurations(self):
         cfgs = {}