Reimplement dependency order handling to solve a performance issue.
[matrix.git] / matrix / components.py
index 72f7217..bd9c970 100644 (file)
@@ -16,11 +16,11 @@ class Component(object):
        __dirty = None
 
        cached = None
        __dirty = None
 
        cached = None
-
-       rdepends = None
-       weight = None
        state = None
 
        state = None
 
+       rebuild_checked = False
+       needs_rebuild = False
+
        def __init__(self, name, branch=None, flags=[], rank=0):
                self.name = name
 
        def __init__(self, name, branch=None, flags=[], rank=0):
                self.name = name
 
@@ -72,19 +72,6 @@ class Component(object):
        def get_depends(self):
                return self.depends
 
        def get_depends(self):
                return self.depends
 
-       def add_rdepend(self, c):
-               if self.rdepends is None:
-                       self.rdepends = set()
-
-               self.rdepends.add(c)
-
-       def get_rdepends(self):
-               return self.rdepends or ()
-
-       def clear_rdepends(self):
-               if self.rdepends:
-                       del self.rdepends
-
 class PlatformProvidedComponent(Component):
        """A Component that is provided by the platform.
           The sources will not be built during install."""
 class PlatformProvidedComponent(Component):
        """A Component that is provided by the platform.
           The sources will not be built during install."""
@@ -287,8 +274,3 @@ def fill_in_depends(components):
                                        depends.add(dep)
 
                components |= depends
                                        depends.add(dep)
 
                components |= depends
-
-def init_rdepends(components):
-       for c in components:
-               for dep in c.get_depends():
-                       dep.add_rdepend(c)