[gnome-continuous/fdo-base: 4/4] Build the base system depending on the base type



commit 5da91bee5a636cb06ac7f15c43f807c192e24ed1
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Oct 17 13:01:59 2018 +0100

    Build the base system depending on the base type
    
    The base system can come from different locations; we're using a Yocto
    base at the moment, but in the future we will switch to something else.
    In the end, all we care about is an ostree repository.

 src/js/tasks/task-build.js | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index f2b5a66..5566aa7 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1170,7 +1170,7 @@ const TaskBuild = new Lang.Class({
     },
 
     /* Build the Yocto base system. */
-    _buildBase: function(architecture, cancellable) {
+    _buildYoctoBase: function(architecture, cancellable) {
         let basemeta = this._snapshot.getExpanded(this._snapshot.data['base']['name']);
        let basename = basemeta['name'];
        let buildWorkdir = Gio.File.new_for_path('build-' + basemeta['name'] + '-' + architecture);
@@ -1353,11 +1353,20 @@ const TaskBuild = new Lang.Class({
        }
 
         let baseName = this._snapshot.data['base']['name'];
+        let baseType = this._snapshot.data['base']['type'] || 'yocto';
         let architectures = this._snapshot.data['architectures'];
 
-        for (let i = 0; i < architectures.length; i++) {
-            this._buildBase(architectures[i], cancellable);
-       }
+        switch (baseType) {
+            case 'yocto': {
+                for (let i = 0; i < architectures.length; i++) {
+                    this._buildYoctoBase(architectures[i], cancellable);
+               }
+                break;
+            }
+
+            default:
+                break;
+        }
 
         let componentToArches = {};
 


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