[gnome-ostree] autobuilder: Don't hardcode major/minor format
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] autobuilder: Don't hardcode major/minor format
- Date: Tue, 29 Jan 2013 20:11:19 +0000 (UTC)
commit 839a21132e1a36b648fc794817e32839936369d4
Author: Colin Walters <walters verbum org>
Date: Tue Jan 29 14:27:16 2013 -0500
autobuilder: Don't hardcode major/minor format
src/ostbuild/js/builtins/autobuilder.js | 11 +++++------
src/ostbuild/js/subtask.js | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ostbuild/js/builtins/autobuilder.js b/src/ostbuild/js/builtins/autobuilder.js
index 950400d..17268c8 100644
--- a/src/ostbuild/js/builtins/autobuilder.js
+++ b/src/ostbuild/js/builtins/autobuilder.js
@@ -185,8 +185,7 @@ const Autobuilder = new Lang.Class({
let t = this._resolve_taskset.start(context,
cancellable,
Lang.bind(this, this._onResolveExited));
- print(Format.vprintf("Resolve task %s.%s started (%s)", [t.major, t.minor,
- isFull ? "full" : "incremental"]));
+ print(Format.vprintf("Resolve task %s started (%s)", [t.versionstr, isFull ? "full" : "incremental"]));
this._updateStatus();
@@ -239,7 +238,7 @@ const Autobuilder = new Lang.Class({
let task = this._build_taskset.start(context,
cancellable,
Lang.bind(this, this._onBuildExited));
- print(Format.vprintf("Build task %s.%s started", [task.major, task.minor]));
+ print(Format.vprintf("Build task %s started", [task.versionstr]));
this._updateStatus();
},
@@ -256,7 +255,7 @@ const Autobuilder = new Lang.Class({
let task = this._builddisks_taskset.start(context,
cancellable,
Lang.bind(this, this._onBuildDisksExited));
- print(Format.vprintf("Builddisks task %s.%s started", [task.major, task.minor]));
+ print(Format.vprintf("Builddisks task %s started", [task.versionstr]));
this._updateStatus();
},
@@ -273,7 +272,7 @@ const Autobuilder = new Lang.Class({
let task = this._smoke_taskset.start(context,
cancellable,
Lang.bind(this, this._onSmokeExited));
- print(Format.vprintf("Smoke task %s.%s started", [task.major, task.minor]));
+ print(Format.vprintf("Smoke task %s started", [task.versionstr]));
this._updateStatus();
},
@@ -327,7 +326,7 @@ const Autobuilder = new Lang.Class({
let entries = [];
for (let i = Math.max(l - MAXITEMS, 0); i >= 0 && i < l; i++) {
let item = history[i];
- let data = {v: Format.vprintf('%d.%d', [item.major, item.minor]),
+ let data = {v: item.versionstr,
state: item.state,
timestamp: item.timestamp};
entries.push(data);
diff --git a/src/ostbuild/js/subtask.js b/src/ostbuild/js/subtask.js
index d97968c..ddab482 100644
--- a/src/ostbuild/js/subtask.js
+++ b/src/ostbuild/js/subtask.js
@@ -34,6 +34,7 @@ const TaskHistoryEntry = new Lang.Class({
let match = VERSION_RE.exec(path.get_basename());
this.major = parseInt(match[1]);
this.minor = parseInt(match[2]);
+ this.versionstr = Format.vprintf('%d.%d', [this.major, this.minor]);
this.timestamp = null;
this.logfile_path = null;
this.start_timestamp = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]