From 2658d3c95d43dfcff95a6cd7285f3966dfa5bb2e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 22 Mar 2006 16:03:39 +0000 Subject: lib/bb/data_smart.py: ReAdd the handlers when unpickling the file parse/parse_py/BBHandler.py: Save the once added handlers in the bitbake file. --- lib/bb/data_smart.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/bb/data_smart.py') diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 52f391dec..93a6acfc9 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -285,11 +285,20 @@ class DataSmartPackage(DataSmart): p = pickle.Unpickler( file("%s/%s"%(self.cache,cache_bbfile),"rb")) self.dict = p.load() self.unpickle_prep() + + # compile the functions into global scope funcstr = self.getVar('__functions__', 0) if funcstr: comp = utils.better_compile(funcstr, "", self.bbfile) utils.better_exec(comp, __builtins__, funcstr, self.bbfile) + # now add the handlers which were present + handlers = self.getVar('__all_handlers__', 0) or {} + import bb.event + for key in handlers.keys(): + bb.event.register(key, handlers[key]) + + def linkDataSet(self): if not self.parent == None: # assume parent is a DataSmartInstance -- cgit 1.2.3-korg