示例#1
0
 def resolve_and_build(self):
     """ resolves the dependencies of this build target and builds it """
     pdebug("resolving and building task '%s'" % self.name,
             groups=["build_task"])
     indent_text(indent="++2")
     toret = self.build(**self.resolve_dependencies())
     indent_text(indent="--2")
     return toret
示例#2
0
    def register_dependency(self, data_src, data_sink):
        """ registers a dependency of data_src -> data_sink
            by placing appropriate entries in provides_for and depends_on
        """

        pdebug("registering dependency %s -> %s" % (data_src, data_sink))

        if (data_src not in self._gettask(data_sink).depends_on):
            self._gettask(data_sink).depends_on.append(data_src)

        if (data_sink not in self._gettask(data_src).provides_for):
            self._gettask(data_src).provides_for.append(data_sink)
示例#3
0
    def update_task(self, taskname, ignore_dependents=[]):
        pout("updating task %s" % taskname)
        last_value = self._gettask(taskname).value
        self.build_task(taskname)

        if last_value != self._gettask(taskname).value:
            dependent_order = self.resolve_dependency_graph(taskname)
            for index, dependent in enumerate(dependent_order):
                if (dependent not in ignore_dependents and
                        self.tasks[dependent].last_build_time > 0):
                    self.update_task(
                        dependent,
                        ignore_dependents=dependent_order[index:])
        else:
            pdebug("no change in %s" % taskname)