[gnome-ostree/wip/simple-cleanups: 18/23] task: Write out the path to the build in the meta.json



commit 0d61c53e4471177bc7cb2947e1cfa89a8efef527
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jun 13 14:32:13 2013 -0400

    task: Write out the path to the build in the meta.json
    
    So that clients don't have to reverse engineer it.

 src/js/task.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/js/task.js b/src/js/task.js
index 960aa16..3f14a3e 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -501,11 +501,13 @@ const TaskDef = new Lang.Class({
        }
 
        let elapsedMillis = GLib.get_monotonic_time() / 1000 - this._startTimeMillis;
+       let targetPath = this.workdir.get_relative_path(this._taskCwd);
        let meta = { taskMetaVersion: 0,
                     taskVersion: this._version,
                     success: success,
                     errmsg: errmsg,
-                    elapsedMillis: elapsedMillis };
+                    elapsedMillis: elapsedMillis,
+                    path: targetPath };
        let statusTxtPath = this._taskCwd.get_child('status.txt');
        if (statusTxtPath.query_exists(null)) {
            let contents = GSystem.file_load_contents_utf8(statusTxtPath, cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]