bitbake/lib/bb/cache:
authorHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 23 Mar 2006 23:32:03 +0000 (23:32 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 23 Mar 2006 23:32:03 +0000 (23:32 +0000)
-Fix the method invocation in methodpool
 to use the right amount of arguments
-Update data_smart to the new cache layout
 of the file functions

lib/bb/data_smart.py
lib/bb/methodpool.py

index 93a6acf..8b062ee 100644 (file)
@@ -29,7 +29,7 @@ Based on functions from the base bb module, Copyright 2003 Holger Schurig
 """
 
 import copy, os, re, sys, time, types
-from   bb import note, debug, fatal, utils
+from   bb import note, debug, fatal, utils, methodpool
 
 try:
     import cPickle as pickle
@@ -287,10 +287,10 @@ class DataSmartPackage(DataSmart):
         self.unpickle_prep()
 
         # compile the functions into global scope
-        funcstr = self.getVar('__functions__', 0)
-        if funcstr:
-            comp = utils.better_compile(funcstr, "<pickled>", self.bbfile)
-            utils.better_exec(comp, __builtins__, funcstr, self.bbfile)
+        funcs = self.getVar('__functions__', 0) or {}
+        for key in funcs.keys():
+            methodpool.check_insert_method( key, funcs[key], self.bbfile )
+            methodpool.parsed_module( key )
 
         # now add the handlers which were present
         handlers = self.getVar('__all_handlers__', 0) or {}
index 27bc4be..67cb626 100644 (file)
@@ -65,7 +65,7 @@ def check_insert_method(modulename, code, fn):
     name will be used for that 
     """
     if not modulename in _parsed_methods:
-        return insert_method(modulename, code)
+        return insert_method(modulename, code, fn)
 
 def parsed_module(modulename):
     """