[gnome-continuous/wip/yocto1.7] Allow overriding ostree-build-yocto and BB_ENV_EXTRAWHITE
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous/wip/yocto1.7] Allow overriding ostree-build-yocto and BB_ENV_EXTRAWHITE
- Date: Fri, 26 Sep 2014 08:42:23 +0000 (UTC)
commit 1b0361ec1edbcdf3d7f5de65d23927c7e1d51253
Author: Alexander Larsson <alexl redhat com>
Date: Fri Sep 26 10:37:39 2014 +0200
Allow overriding ostree-build-yocto and BB_ENV_EXTRAWHITE
If you create a $workdir/overrides/ostree-build-yocto it will be used
instead of the standard ostree-build-yocto. Also, ostree-build-yocto
will append OSTREE_BB_ENV_EXTRAWHITE to the BB_ENV_EXTRAWHITE (that
it sets via oe-init-build-env).
This two changes allow us to use the python27 and git19 scls on rhel6
by having an override file that does something like:
#!/bin/sh
OSTREE_BB_ENV_EXTRAWHITE="LD_LIBRARY_PATH" 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 ++++++++-
src/ostree-build-yocto | 2 ++
2 files changed, 10 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
diff --git a/src/ostree-build-yocto b/src/ostree-build-yocto
index e8d9f90..9173b22 100644
--- a/src/ostree-build-yocto
+++ b/src/ostree-build-yocto
@@ -46,6 +46,8 @@ for layername in ${LAYERNAMES}; do
LAYERS="${LAYERS} \${OSTREE_SRCDIR}/${layername}"
done
+BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE $OSTREE_BB_ENV_EXTRAWHITE"
+
cat > ${builddir}/conf/bblayers.conf <<EOF
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]