]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqueue.py: always emit bb.event.DepTreeGenerated
authorPatrick Ohly <patrick.ohly@intel.com>
Thu, 12 May 2016 15:00:10 +0000 (17:00 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 May 2016 16:46:07 +0000 (17:46 +0100)
The data included in the event is useful for implementing a pre-build
check that warns about unexpected components, for example because of
an incorrect configuration or changed dependencies.

Such a check can be done in a .bbclass that gets inherited
globally. But in contrast to a UI, such a class cannot request that
the event shall be emitted, and thus the event has to be emitted
whether there is a consumer or not.

This was done conditionally earlier out of concerns about the
performance impact. But now events are handled more efficiently, so
that concern no longer seems valid: in some simple testing (admittedly
on a fast build workstation), the two lines (generating the data and
emitting the event with it) only took about 0.05 seconds (measured
with timeit). That was for a build with roughly 500 recipes (from
pn-buildlist aka depgraph['pn']), triggered via the command line. That
was even with a consumer of the data active and doing some work, so it
should be even faster when there is no consumer.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/runqueue.py

index aaaafc594fcb1bb76f246e519a152e9ad64432d4..5ab7e97088beb2b905522dc520c1dac845827d6b 100644 (file)
@@ -1126,10 +1126,10 @@ class RunQueue:
             else:
                 self.state = runQueueSceneInit
 
-                # we are ready to run, see if any UI client needs the dependency info
-                if bb.cooker.CookerFeatures.SEND_DEPENDS_TREE in self.cooker.featureset:
-                    depgraph = self.cooker.buildDependTree(self, self.rqdata.taskData)
-                    bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
+                # we are ready to run,  emit dependency info to any UI or class which
+                # needs it
+                depgraph = self.cooker.buildDependTree(self, self.rqdata.taskData)
+                bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
 
         if self.state is runQueueSceneInit:
             dump = self.cooker.configuration.dump_signatures