]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Remove two layers of unnecessary functions from task execution
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 5 Jul 2010 14:04:06 +0000 (15:04 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 16 Jul 2010 11:31:19 +0000 (12:31 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cooker.py
bitbake/lib/bb/runqueue.py

index 488bc610d27745e98c20df010864cf1d5e13eb60..52a402cd916988f25fd6011ececa9d1131b515d1 100644 (file)
@@ -162,38 +162,6 @@ class BBCooker:
 
         return self.command.runAsyncCommand()
 
-    def tryBuildPackage(self, fn, item, task, the_data):
-        """
-        Build one task of a package, optionally build following task depends
-        """
-        try:
-            if not self.configuration.dry_run:
-                bb.build.exec_task('do_%s' % task, the_data)
-            return True
-        except bb.build.FuncFailed:
-            bb.msg.error(bb.msg.domain.Build, "task stack execution failed")
-            raise
-        except bb.build.EventException as e:
-            event = e.args[1]
-            bb.msg.error(bb.msg.domain.Build, "%s event exception, aborting" % bb.event.getName(event))
-            raise
-
-    def tryBuild(self, fn, task):
-        """
-        Build a provider and its dependencies.
-        build_depends is a list of previous build dependencies (not runtime)
-        If build_depends is empty, we're dealing with a runtime depends
-        """
-
-        the_data = self.bb_cache.loadDataFull(fn, self.configuration.data)
-
-        item = self.status.pkg_fn[fn]
-
-        #if bb.build.stamp_is_current('do_%s' % self.configuration.cmd, the_data):
-        #    return True
-
-        return self.tryBuildPackage(fn, item, task, the_data)
-
     def showVersions(self):
 
         # Need files parsed
index a4aea6c00496188de24bf0b3e3494c106622868f..afbc16a9f01667af5fea16bbfb7e0bad028dbf17 100644 (file)
@@ -979,8 +979,18 @@ class RunQueue:
                     bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data)
                     bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY2", fn, self.cooker.configuration.data)
                     try:
-                        self.cooker.tryBuild(fn, taskname[3:])
-                    except bb.build.EventException:
+                        the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.configuration.data)
+
+                        if not self.cooker.configuration.dry_run:
+                            bb.build.exec_task(taskname, the_data)
+                        os._exit(0)
+
+                    except bb.build.FuncFailed:
+                        bb.msg.error(bb.msg.domain.Build, "task stack execution failed")
+                        os._exit(1)
+                    except bb.build.EventException as e:
+                        event = e.args[1]
+                        bb.msg.error(bb.msg.domain.Build, "%s event exception, aborting" % bb.event.getName(event))
                         os._exit(1)
                     except Exception:
                         from traceback import format_exc