[gnome-continuous/wip/yocto1.7: 1/2] Allow overriding ostree-build-yocto



commit 3ce21e52ce8626750d5bebd6c3ef20168ac9fa0c
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 26 10:37:39 2014 +0200

    Allow overriding ostree-build-yocto
    
    If you create a $workdir/overrides/ostree-build-yocto it will be used
    instead of the standard ostree-build-yocto.
    
    This change allow us to use the python27 and git19 scls on rhel6
    by having an override file that does something like:
    
     #!/bin/sh
    scl enable python27 git19 "/PREFIX/lib/gnome-continuous/ostree-build-yocto $*"
    
    Where PREFIX is where you installed gnome-continuous.

 src/js/tasks/task-build.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 4d0df93..a5ca125 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -1211,7 +1211,14 @@ const TaskBuild = new Lang.Class({
         let sstateDir = oldBuilddir.get_child('sstate-cache');
         let downloads = oldBuilddir.get_child('downloads');
 
-        let cmd = [this.libdir.get_path() + '/ostree-build-yocto',
+        let ostree_build_yocto = this.libdir.get_path() + '/ostree-build-yocto';
+        let overridePath = this.workdir.resolve_relative_path('overrides/ostree-build-yocto');
+        if (overridePath.query_exists(null)) {
+            print("Using override: " + overridePath.get_path());
+            ostree_build_yocto = overridePath.get_path();
+        }
+
+        let cmd = [ostree_build_yocto,
                   checkoutdir.get_path(), builddir.get_path(), architecture,
                   this.repo.get_path()];
         // We specifically want to kill off any environment variables jhbuild


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