[gnome-ostree] autobuilder: Copy snapshot before starting a build



commit b277eb41583e849262936fd78334ef5ed3f18013
Author: Colin Walters <walters verbum org>
Date:   Sun Jan 6 12:23:30 2013 -0500

    autobuilder: Copy snapshot before starting a build
    
    Otherwise it might get deleted by concurrent resolves while the build
    is running.

 src/libgsystem                          |    2 +-
 src/ostbuild/js/builtins/autobuilder.js |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libgsystem b/src/libgsystem
index c0d3e96..b142443 160000
--- a/src/libgsystem
+++ b/src/libgsystem
@@ -1 +1 @@
-Subproject commit c0d3e9641af40124e0b4a2b217c08de48bd2e5c5
+Subproject commit b1424432d7cc7af622ef1dbaaf71282cec683df6
diff --git a/src/ostbuild/js/builtins/autobuilder.js b/src/ostbuild/js/builtins/autobuilder.js
index 00ad018..864fd38 100644
--- a/src/ostbuild/js/builtins/autobuilder.js
+++ b/src/ostbuild/js/builtins/autobuilder.js
@@ -201,7 +201,9 @@ const AutoBuilder = new Lang.Class({
 
 	let task = this._build_taskset.start();
 	let workdir = task.path;
-	let args = ['ostbuild', 'build', '--src-snapshot=' + this._source_snapshot_path.get_path()];
+	let transientSnapshotPath = this.workdir.get_child(this.prefix + '-src-snapshot.json');
+	GSystem.file_linkcopy(this._source_snapshot_path, transientSnapshotPath, Gio.FileCopyFlags.OVERWRITE, null);
+	let args = ['ostbuild', 'build', '--src-snapshot=' + transientSnapshotPath.get_path()];
 	args.push.apply(args, this._queued_force_builds);
 	this._queued_force_builds = [];
 



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