[gnome-ostree] build: Write out build result in jsondb, not ad-hoc file
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: Write out build result in jsondb, not ad-hoc file
- Date: Tue, 29 Jan 2013 20:10:49 +0000 (UTC)
commit 2676fe94fa7c5bebaa3eb7fe7a91c71fb05abdce
Author: Colin Walters <walters verbum org>
Date: Mon Jan 28 08:49:46 2013 -0500
build: Write out build result in jsondb, not ad-hoc file
Trying to centralize our data management a bit.
src/libgsystem | 2 +-
src/ostbuild/js/builtins/build.js | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libgsystem b/src/libgsystem
index 6890c19..7caa16d 160000
--- a/src/libgsystem
+++ b/src/libgsystem
@@ -1 +1 @@
-Subproject commit 6890c19d51da21de1e45a1ac39020672cf6b2b02
+Subproject commit 7caa16d62721edb3800481b874613c4f989058f3
diff --git a/src/ostbuild/js/builtins/build.js b/src/ostbuild/js/builtins/build.js
index 5ffcb15..1a7abd5 100644
--- a/src/ostbuild/js/builtins/build.js
+++ b/src/ostbuild/js/builtins/build.js
@@ -793,7 +793,8 @@ const Build = new Lang.Class({
}
}
- let buildDataPath = this.workdir.get_child(this.prefix + '-buildresult.json');
+ let buildresultDir = this.workdir.get_child('builds').get_child(prefix);
+ let builddb = new JsonDB.JsonDB(buildresultDir);
let targetRevisions = {};
let buildData = { snapshotName: this._snapshot.path.get_basename(),
snapshot: this._snapshot.data,
@@ -804,6 +805,7 @@ const Build = new Lang.Class({
let [treename, ostreeRev] = this._composeOneTarget(target, componentBuildRevs, cancellable);
targetRevisions[treename] = ostreeRev;
}
- JsonUtil.writeJsonFileAtomic(buildDataPath, buildData, cancellable);
+ let [path, modified] = builddb.store(buildData, cancellable);
+ print("Build complete: " + path.get_path());
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]