summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 18:42:24 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 19:38:28 (GMT)
commitfe967227ddee5a93d053b1b0eae144c5869ff388 (patch)
tree604bda026813a1deefa5f3f98a011673f78862fd /bitbake
parent95f02a2ab1240b3de04bd725ca43e08b6e15caef (diff)
downloadpoky-fe967227ddee5a93d053b1b0eae144c5869ff388.tar.gz
runqueue.py: Wrap parsing with exception trapping
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 52360ac..772b366 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1109,32 +1109,32 @@ class RunQueueExecute:
1109 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data) 1109 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data)
1110 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data) 1110 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data)
1111 bb.parse.siggen.set_taskdata(self.rqdata.hashes, self.rqdata.hash_deps) 1111 bb.parse.siggen.set_taskdata(self.rqdata.hashes, self.rqdata.hash_deps)
1112
1113 the_data = bb.cache.Cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data)
1114
1115 env2 = bb.data.export_vars(the_data)
1116 env2 = bb.data.export_envvars(env2, the_data)
1117
1118 for e in os.environ:
1119 os.unsetenv(e)
1120 for e in env2:
1121 os.putenv(e, env2[e])
1122 for e in env:
1123 os.putenv(e, env[e])
1124
1125 if quieterrors:
1126 the_data.setVarFlag(taskname, "quieterrors", "1")
1127
1128
1129 for h in self.rqdata.hashes:
1130 bb.data.setVar("BBHASH_%s" % h, self.rqdata.hashes[h], the_data)
1131 for h in self.rqdata.hash_deps:
1132 bb.data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h], the_data)
1133
1134 bb.data.setVar("BB_TASKHASH", self.rqdata.runq_hash[task], the_data)
1135
1136 ret = 0 1112 ret = 0
1137 try: 1113 try:
1114 the_data = bb.cache.Cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data)
1115 the_data.setVar('BB_TASKHASH', self.rqdata.runq_hash[task])
1116 for h in self.rqdata.hashes:
1117 the_data.setVar("BBHASH_%s" % h, self.rqdata.hashes[h])
1118 for h in self.rqdata.hash_deps:
1119 the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h])
1120
1121 env2 = bb.data.export_vars(the_data)
1122 env2 = bb.data.export_envvars(env2, the_data)
1123 for e in os.environ:
1124 os.unsetenv(e)
1125 for e in env2:
1126 os.putenv(e, env2[e])
1127 for e in env:
1128 os.putenv(e, env[e])
1129
1130 if quieterrors:
1131 the_data.setVarFlag(taskname, "quieterrors", "1")
1132
1133 except Exception as exc:
1134 if not quieterrors:
1135 logger.critical(str(exc))
1136 os._exit(1)
1137 try:
1138 if not self.cooker.configuration.dry_run: 1138 if not self.cooker.configuration.dry_run:
1139 ret = bb.build.exec_task(fn, taskname, the_data) 1139 ret = bb.build.exec_task(fn, taskname, the_data)
1140 os._exit(ret) 1140 os._exit(ret)