summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
committerRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
commitb26a945734ce271aa7d443ff9e96fe2851b21138 (patch)
treef540b8d58a7411cf0cabe5c8f4ad40f9f597352a /bitbake/lib/bb/build.py
parent3cd47ad235d54a9c539ae6fe4a5a2b4b5f7e5621 (diff)
downloadpoky-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.gz
Update to latest bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 599b45d9d3..b59473bc23 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -25,7 +25,7 @@ You should have received a copy of the GNU General Public License along with
25Based on functions from the base bb module, Copyright 2003 Holger Schurig 25Based on functions from the base bb module, Copyright 2003 Holger Schurig
26""" 26"""
27 27
28from bb import debug, data, fetch, fatal, error, note, event, mkdirhier 28from bb import debug, data, fetch, fatal, error, note, event, mkdirhier, utils
29import bb, os 29import bb, os
30 30
31# data holds flags and function name for a given task 31# data holds flags and function name for a given task
@@ -122,14 +122,15 @@ def exec_func_python(func, d):
122 """Execute a python BB 'function'""" 122 """Execute a python BB 'function'"""
123 import re, os 123 import re, os
124 124
125 tmp = "def " + func + "():\n%s" % data.getVar(func, d) 125 tmp = "def " + func + "():\n%s" % data.getVar(func, d)
126 comp = compile(tmp + '\n' + func + '()', bb.data.getVar('FILE', d, 1) + ':' + func, "exec") 126 tmp += '\n' + func + '()'
127 comp = utils.better_compile(tmp, func, bb.data.getVar('FILE', d, 1) )
127 prevdir = os.getcwd() 128 prevdir = os.getcwd()
128 g = {} # globals 129 g = {} # globals
129 g['bb'] = bb 130 g['bb'] = bb
130 g['os'] = os 131 g['os'] = os
131 g['d'] = d 132 g['d'] = d
132 exec comp in g 133 utils.better_exec(comp,g,tmp, bb.data.getVar('FILE',d,1))
133 if os.path.exists(prevdir): 134 if os.path.exists(prevdir):
134 os.chdir(prevdir) 135 os.chdir(prevdir)
135 136