[gnome-continuous] hwtest: Set default target to gnome-hwtest.target
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] hwtest: Set default target to gnome-hwtest.target
- Date: Thu, 17 Jul 2014 17:55:40 +0000 (UTC)
commit 8a144bde870e0544bab603f8cf6e15f45b2cc11b
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Jun 5 10:03:59 2014 -0400
hwtest: Set default target to gnome-hwtest.target
When creating the hwtest tree, we want the default systemctl target
to be gnome-hwtest.target, so that we can start the appropriate
activity (install, controller, update)
https://bugzilla.gnome.org/show_bug.cgi?id=732394
src/js/tasks/task-build.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 32e3fac..952a050 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1110,6 +1110,16 @@ const TaskBuild = new Lang.Class({
GSystem.file_linkcopy(kernelInitramfsData.initramfsPath, targetInitramfsPath,
Gio.FileCopyFlags.ALL_METADATA, cancellable);
},
+ _setHWTestTarget: function(composeRootdir, cancellable) {
+ let targetDirectory = composeRootdir.get_child('usr/etc/systemd/system');
+ if (!targetDirectory.query_exists(cancellable))
+ targetDirectory.make_directory_with_parents(cancellable);
+ let defaultTarget = targetDirectory.get_child('default.target');
+ if (defaultTarget.query_exists(cancellable))
+ defaultTarget.delete(cancellable);
+ defaultTarget.make_symbolic_link('/usr/lib/systemd/system/gnome-hwtest.target', cancellable);
+ },
+
/* Build the Yocto base system. */
_buildBase: function(architecture, cancellable) {
let basemeta = this._snapshot.getExpanded(this._snapshot.data['base']['name']);
@@ -1497,6 +1507,9 @@ const TaskBuild = new Lang.Class({
let kernelInitramfsData = archInitramfsImages[architecture];
this._installKernelAndInitramfs(kernelInitramfsData, composeRootdir, cancellable);
+ if (target == 'hwtest')
+ this._setHWTestTarget(composeRootdir, cancellable);
+
this._cleanupGarbage(composeRootdir, cancellable);
let [treename, ostreeRev] = this._commitComposedTree(runtimeTargetName, composeRootdir,
cancellable);
BuildUtil.timeSubtask("cleanup " + runtimeTargetName, Lang.bind(this, function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]