[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4102/8267] bitbake: cooker: Add BB_LIMITEDDEPS support



commit 51abd41ff6e732ee0df61f380e4de23fdec7629a
Author: Richard Purdie <richard purdie linuxfoundation org>
Date:   Sat Jan 14 14:16:44 2017 +0000

    bitbake: cooker: Add BB_LIMITEDDEPS support
    
    When we're running with bitbake -b, BB_TASKDEPDATA is incorrect and limited.
    We really need a way to know this from the metadata and this new variable
    provides this in worker context. This means existing code can stop having
    to guess.
    
    (Bitbake rev: 05763bc886024dcce2ce6b3060fb00abf79a9402)
    
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 bitbake/bin/bitbake-worker   |    2 ++
 bitbake/lib/bb/cooker.py     |    1 +
 bitbake/lib/bb/cookerdata.py |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 5010bad..ee2d622 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -222,6 +222,8 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
                 the_data = databuilder.mcdata[mc]
                 the_data.setVar("BB_WORKERCONTEXT", "1")
                 the_data.setVar("BB_TASKDEPDATA", taskdepdata)
+                if cfg.limited_deps:
+                    the_data.setVar("BB_LIMITEDDEPS", "1")
                 the_data.setVar("BUILDNAME", workerdata["buildname"])
                 the_data.setVar("DATE", workerdata["date"])
                 the_data.setVar("TIME", workerdata["time"])
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index a7b9745..80007c5 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1409,6 +1409,7 @@ class BBCooker:
         item = info_array[0].pn
         self.recipecaches[mc].ignored_dependencies = set()
         self.recipecaches[mc].bbfile_priority[fn] = 1
+        self.configuration.limited_deps = True
 
         # Remove external dependencies
         self.recipecaches[mc].task_deps[fn]['depends'] = {}
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index d9eab56..53f4587 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -147,6 +147,7 @@ class CookerConfiguration(object):
         self.interface = []
         self.writeeventlog = False
         self.server_only = False
+        self.limited_deps = False
 
         self.env = {}
 


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