[gnome-continuous] task: Save the buildPath on the runner
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] task: Save the buildPath on the runner
- Date: Wed, 9 Oct 2013 20:31:17 +0000 (UTC)
commit 1445125ead0e9af07e4b3d04837568142beeff4c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 9 16:10:25 2013 -0400
task: Save the buildPath on the runner
src/js/task.js | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/js/task.js b/src/js/task.js
index aa59e50..645c8da 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -152,11 +152,6 @@ const TaskMaster = new Lang.Class({
this._scheduledTaskTimeouts = {};
},
- _getTaskBuildPath: function(taskName) {
- let buildPath = this.tasksPath.resolve_relative_path(taskName);
- return GSystem.file_realpath(buildPath);
- },
-
_setTaskBuildPath: function(taskName, buildPath) {
let taskLink = this.tasksPath.get_child(taskName);
BuildUtil.atomicSymlinkSwap(taskLink, buildPath, this.cancellable);
@@ -307,8 +302,7 @@ const TaskMaster = new Lang.Class({
let after = this._taskset.getTasksAfter(taskName);
for (let i = 0; i < after.length; i++) {
let afterTaskName = after[i];
- let buildPath = this._getTaskBuildPath(taskName);
- this._setTaskBuildPath(afterTaskName, buildPath);
+ this._setTaskBuildPath(afterTaskName, runner.buildPath);
if (!this._skipTasks[afterTaskName] && this._processAfter)
this._pushTask(afterTaskName, {});
}
@@ -388,17 +382,17 @@ const TaskRunner = new Lang.Class({
// cwd in its own task dir. If a task has any results it wants to pass
// on between builds, it needs to write to _OSTBUILD_BUILDDIR.
let buildPath = this.taskmaster.tasksPath.resolve_relative_path(this.name);
- buildPath = GSystem.file_realpath(buildPath);
+ this.buildPath = GSystem.file_realpath(buildPath);
- this.buildName = buildPath.get_basename();
- this.taskCwd = buildPath.get_child(this.name);
+ this.buildName = this.buildPath.get_basename();
+ this.taskCwd = this.buildPath.get_child(this.name);
GSystem.file_ensure_directory(this.taskCwd, false, cancellable);
let baseArgv = ['ostbuild', 'run-task', this.name, JSON.stringify(this.taskData.parameters)];
let context = new GSystem.SubprocessContext({ argv: baseArgv });
context.set_cwd(this.taskCwd.get_path());
let childEnv = GLib.get_environ();
- childEnv.push('_OSTBUILD_BUILDDIR=' + buildPath.get_path());
+ childEnv.push('_OSTBUILD_BUILDDIR=' + this.buildPath.get_path());
childEnv.push('_OSTBUILD_WORKDIR=' + this.workdir.get_path());
context.set_environment(childEnv);
if (this.taskData.taskDef.PreserveStdout) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]