[gnome-continuous] autobuilder: autoupdate itself via jhbuild
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] autobuilder: autoupdate itself via jhbuild
- Date: Wed, 30 Apr 2014 13:47:51 +0000 (UTC)
commit 56bd9a2d2295d4c0bd0f85e0f62cb791a68c38ce
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Tue Apr 29 15:10:22 2014 +0200
autobuilder: autoupdate itself via jhbuild
autoupdater now fetches the code and tries 'jhbuild make'.
If it fails 'jhbuild build gnome-continuous' will be executed
https://bugzilla.gnome.org/show_bug.cgi?id=697046
src/js/builtins/autobuilder.js | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/src/js/builtins/autobuilder.js b/src/js/builtins/autobuilder.js
index 521a66e..9ac94dc 100644
--- a/src/js/builtins/autobuilder.js
+++ b/src/js/builtins/autobuilder.js
@@ -47,6 +47,7 @@ const Autobuilder = new Lang.Class({
this.parent();
this.parser.addArgument('--autoupdate-self', { action: 'store' });
+ this.parser.addArgument('--autoupdate-rebuild', { action: 'store' });
this._buildNeeded = true;
this._initialResolveNeeded = true;
@@ -66,6 +67,9 @@ const Autobuilder = new Lang.Class({
if (args.autoupdate_self)
this._autoupdate_self = Gio.File.new_for_path(args.autoupdate_self);
+ if (args._autoupdate_rebuild)
+ this._autoupdate_rebuild = Gio.File.new_for_path(args._autoupdate_rebuild);
+
this._ownId = Gio.DBus.session.own_name('org.gnome.OSTreeBuild', Gio.BusNameOwnerFlags.NONE,
function(name) {},
function(name) { loop.quit(); });
@@ -181,9 +185,25 @@ const Autobuilder = new Lang.Class({
if (this._taskmaster.isTaskQueued('resolve'))
return;
- if (this._autoupdate_self)
- ProcUtil.runSync(['git', 'pull', '-r'], cancellable,
+ if (this._autoupdate_self){
+ ProcUtil.runSync(['git', 'pull', '-r'], cancellable,
+ { cwd: this._autoupdate_self })
+ }
+ if (this._autoupdate_rebuild){
+ try {
+ ProcUtil.runSync(['jhbuild', 'make'], cancellable,
{ cwd: this._autoupdate_self })
+ } catch (e1) {
+ print("selfupdate via jhbuild make failed, falling back to jhbuild build")
+ try {
+ ProcUtil.runSync(['jhbuild', 'buildone', 'gnome-continuous'], cancellable,
+ { cwd: this._autoupdate_self })
+ } catch(e2) {
+ print("selfupdate failed: " + e2);
+ }
+ }
+ }
+
let previousVersion = this._buildsDir.currentVersion(cancellable);
let buildPath = this._buildsDir.allocateNewVersion(cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]