[gnome-ostree] Replace `ostree init` with libostree usage.
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] Replace `ostree init` with libostree usage.
- Date: Thu, 5 Sep 2013 18:59:08 +0000 (UTC)
commit e8464f5890158ac9df7d0ceaf2f7e9bbba388591
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 5 00:25:47 2013 -0400
Replace `ostree init` with libostree usage.
src/js/task.js | 3 +++
src/js/tasks/task-build.js | 8 --------
2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/js/task.js b/src/js/task.js
index b1745cd..4007bd3 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -333,6 +333,9 @@ const Task = new Lang.Class({
this.libdir = Gio.File.new_for_path(GLib.getenv('OSTBUILD_LIBDIR'));
this.repo = this.workdir.get_child('repo');
this.ostreeRepo = new OSTree.Repo({ path: this.repo });
+ if (!repo.get_path().query_exists(null))
+ repo.create(OSTree.RepoMode.ARCHIVE_Z2, null);
+ repo.open(null);
},
_getResultDb: function(taskname) {
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 74e2e1e..b70738f 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1217,14 +1217,6 @@ const TaskBuild = new Lang.Class({
}
print("building " + targetSourceVersion);
- this.repo = this.workdir.get_child('repo');
-
- GSystem.file_ensure_directory(this.repo, true, cancellable);
- if (!this.repo.get_child('objects').query_exists(cancellable)) {
- ProcUtil.runSync(['ostree', '--repo=' + this.repo.get_path(), 'init', '--mode=archive-z2'],
- cancellable);
- }
-
this._componentBuildCachePath = this.cachedir.get_child('component-builds.json');
if (this._componentBuildCachePath.query_exists(cancellable)) {
this._componentBuildCache = JsonUtil.loadJson(this._componentBuildCachePath, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]