[gnome-build-meta/tristan/fix-max-job-usage: 6/6] core-deps/boost.bst: Fix max-jobs usage to avoid random cache key



commit 6f0ba9b3fd01a7a93b0ffd829dcee2754102301e
Author: Tristan Van Berkom <tristan vanberkom codethink co uk>
Date:   Mon Sep 10 19:58:30 2018 +0900

    core-deps/boost.bst: Fix max-jobs usage to avoid random cache key
    
    The `max-jobs` variable is an automatic variable which should
    not be fed to builds directly in the build commands, this will
    cause random rebuilds to occur depending on how many jobs BuildStream
    has decided to use, based on the host.
    
    Fixed this by using the `environment-nocache` feature which was
    designed specifically for this.

 elements/core-deps/boost.bst | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/elements/core-deps/boost.bst b/elements/core-deps/boost.bst
index f33d76b..cf77513 100644
--- a/elements/core-deps/boost.bst
+++ b/elements/core-deps/boost.bst
@@ -9,6 +9,10 @@ config:
   configure-commands:
     - ./bootstrap.sh --includedir=%{install-root}%{includedir} --libdir=%{install-root}%{libdir}
   build-commands:
-    - ./b2 -q -j%{max-jobs} --build-dir=_build link=shared stage
+    - ./b2 -q -j${JOBS} --build-dir=_build link=shared stage
   install-commands:
     - ./b2 -q --build-dir=_build link=shared install
+environment:
+  JOBS: '%{max-jobs}'
+environment-nocache:
+- JOBS


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