summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-28 15:01:08 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-28 13:54:31 -0800
commitd4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8 (patch)
treefc42e4f4518015a160edfa88f23ef699839171e2 /bitbake/lib/bb/cooker.py
parentc0202071428fde6ef0a93de9c99d416624628813 (diff)
downloadopenembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.gz
openembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.tar.bz2
openembedded-core-d4125bcac0b1ff225dbfd90d2a5722a2f4e64ff8.zip
bitbake: Simplfy pre and post cooker hooks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 33eb65e2f3..054dac8634 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -70,7 +70,7 @@ class BBCooker:
self.bb_cache = None
if server:
- self.server = server.BitBakeServer(self, self.pre_serve, self.post_serve)
+ self.server = server.BitBakeServer(self)
self.configuration = configuration
@@ -925,6 +925,8 @@ class BBCooker:
def server_main(cooker, func, *args):
+ cooker.pre_serve()
+
if cooker.configuration.profile:
try:
import cProfile as profile
@@ -956,11 +958,12 @@ def server_main(cooker, func, *args):
print("Raw profiling information saved to profile.log and processed statistics to profile.log.processed")
- return ret
else:
- return func(*args)
+ ret = func(*args)
+ cooker.post_serve()
+ return ret
class CookerExit(bb.event.Event):
"""