[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7678/8267] bitbake: runqueue: fix BB_SETSCENE_ENFORCE with empty BB_SETSCENE_ENFORCE_WHITELIST



commit 1bb49ce3228ae429c84830ecc0826092fd3bd072
Author: Paul Eggleton <paul eggleton linux intel com>
Date:   Tue Sep 12 10:49:53 2017 +1200

    bitbake: runqueue: fix BB_SETSCENE_ENFORCE with empty BB_SETSCENE_ENFORCE_WHITELIST
    
    The whitelist shouldn't have to be populated in order for the
    enforcement to work properly - check if the list is not None in order to
    determine whether the functionality is enabled or not since that is how
    the function that sets up the list behaves.
    
    (Bitbake rev: 7b1e79c352ca6eef1693d8abfacf7505544f1caa)
    
    Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 bitbake/lib/bb/runqueue.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6b3a0fc..ae12c25 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1834,7 +1834,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
         Run the tasks in a queue prepared by rqdata.prepare()
         """
 
-        if self.rqdata.setscenewhitelist and not self.rqdata.setscenewhitelist_checked:
+        if self.rqdata.setscenewhitelist is not None and not self.rqdata.setscenewhitelist_checked:
             self.rqdata.setscenewhitelist_checked = True
 
             # Check tasks that are going to run against the whitelist
@@ -2249,7 +2249,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
         self.scenequeue_updatecounters(task)
 
     def check_taskfail(self, task):
-        if self.rqdata.setscenewhitelist:
+        if self.rqdata.setscenewhitelist is not None:
             realtask = task.split('_setscene')[0]
             (mc, fn, taskname, taskfn) = split_tid_mcfn(realtask)
             pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
@@ -2603,7 +2603,7 @@ def get_setscene_enforce_whitelist(d):
 
 def check_setscene_enforce_whitelist(pn, taskname, whitelist):
     import fnmatch
-    if whitelist:
+    if whitelist is not None:
         item = '%s:%s' % (pn, taskname)
         for whitelist_item in whitelist:
             if fnmatch.fnmatch(item, whitelist_item):


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