summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-05 15:04:06 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-16 12:31:19 +0100
commit90db9f30749b3f93a6c7d503af544ee8e0ca1728 (patch)
treec287031745acc56a2753eb867c1a0bb773393659 /bitbake/lib/bb
parent2fa0c30375586a61193f3ee1dea308fbc0fd5eb1 (diff)
downloadpoky-90db9f30749b3f93a6c7d503af544ee8e0ca1728.tar.gz
bitbake: Remove two layers of unnecessary functions from task execution
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/cooker.py32
-rw-r--r--bitbake/lib/bb/runqueue.py14
2 files changed, 12 insertions, 34 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 488bc610d2..52a402cd91 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -162,38 +162,6 @@ class BBCooker:
162 162
163 return self.command.runAsyncCommand() 163 return self.command.runAsyncCommand()
164 164
165 def tryBuildPackage(self, fn, item, task, the_data):
166 """
167 Build one task of a package, optionally build following task depends
168 """
169 try:
170 if not self.configuration.dry_run:
171 bb.build.exec_task('do_%s' % task, the_data)
172 return True
173 except bb.build.FuncFailed:
174 bb.msg.error(bb.msg.domain.Build, "task stack execution failed")
175 raise
176 except bb.build.EventException as e:
177 event = e.args[1]
178 bb.msg.error(bb.msg.domain.Build, "%s event exception, aborting" % bb.event.getName(event))
179 raise
180
181 def tryBuild(self, fn, task):
182 """
183 Build a provider and its dependencies.
184 build_depends is a list of previous build dependencies (not runtime)
185 If build_depends is empty, we're dealing with a runtime depends
186 """
187
188 the_data = self.bb_cache.loadDataFull(fn, self.configuration.data)
189
190 item = self.status.pkg_fn[fn]
191
192 #if bb.build.stamp_is_current('do_%s' % self.configuration.cmd, the_data):
193 # return True
194
195 return self.tryBuildPackage(fn, item, task, the_data)
196
197 def showVersions(self): 165 def showVersions(self):
198 166
199 # Need files parsed 167 # Need files parsed
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index a4aea6c004..afbc16a9f0 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -979,8 +979,18 @@ class RunQueue:
979 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data) 979 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data)
980 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data) 980 bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data)
981 try: 981 try:
982 self.cooker.tryBuild(fn, taskname[3:]) 982 the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.configuration.data)
983 except bb.build.EventException: 983
984 if not self.cooker.configuration.dry_run:
985 bb.build.exec_task(taskname, the_data)
986 os._exit(0)
987
988 except bb.build.FuncFailed:
989 bb.msg.error(bb.msg.domain.Build, "task stack execution failed")
990 os._exit(1)
991 except bb.build.EventException as e:
992 event = e.args[1]
993 bb.msg.error(bb.msg.domain.Build, "%s event exception, aborting" % bb.event.getName(event))
984 os._exit(1) 994 os._exit(1)
985 except Exception: 995 except Exception:
986 from traceback import format_exc 996 from traceback import format_exc