summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorFrazer Clews <frazer.clews@codethink.co.uk>2020-01-16 17:11:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:31:05 +0000
commitfa5524890e86d353ee7d2194ccdd6c84e9bd2d31 (patch)
treef3d46ddbd5dd2b772a727b04303bb97b8ae43b9b /bitbake/lib/bb/cooker.py
parent0ac5174c7d39a3e49893df0d517d47bec1935555 (diff)
downloadpoky-fa5524890e86d353ee7d2194ccdd6c84e9bd2d31.tar.gz
bitbake: lib: amend code to use proper singleton comparisons where possible
amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3d65b0cb74..8407db8b00 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1204,7 +1204,7 @@ class BBCooker:
1204 for c in collection_list: 1204 for c in collection_list:
1205 calc_layer_priority(c) 1205 calc_layer_priority(c)
1206 regex = self.data.getVar("BBFILE_PATTERN_%s" % c) 1206 regex = self.data.getVar("BBFILE_PATTERN_%s" % c)
1207 if regex == None: 1207 if regex is None:
1208 parselog.error("BBFILE_PATTERN_%s not defined" % c) 1208 parselog.error("BBFILE_PATTERN_%s not defined" % c)
1209 errors = True 1209 errors = True
1210 continue 1210 continue
@@ -1310,7 +1310,7 @@ class BBCooker:
1310 self.parseConfiguration() 1310 self.parseConfiguration()
1311 1311
1312 # If we are told to do the None task then query the default task 1312 # If we are told to do the None task then query the default task
1313 if (task == None): 1313 if task is None:
1314 task = self.configuration.cmd 1314 task = self.configuration.cmd
1315 if not task.startswith("do_"): 1315 if not task.startswith("do_"):
1316 task = "do_%s" % task 1316 task = "do_%s" % task
@@ -1454,7 +1454,7 @@ class BBCooker:
1454 self.buildSetVars() 1454 self.buildSetVars()
1455 1455
1456 # If we are told to do the None task then query the default task 1456 # If we are told to do the None task then query the default task
1457 if (task == None): 1457 if task is None:
1458 task = self.configuration.cmd 1458 task = self.configuration.cmd
1459 1459
1460 if not task.startswith("do_"): 1460 if not task.startswith("do_"):
@@ -1687,7 +1687,7 @@ class CookerCollectFiles(object):
1687 def calc_bbfile_priority( self, filename, matched = None ): 1687 def calc_bbfile_priority( self, filename, matched = None ):
1688 for _, _, regex, pri in self.bbfile_config_priorities: 1688 for _, _, regex, pri in self.bbfile_config_priorities:
1689 if regex.match(filename): 1689 if regex.match(filename):
1690 if matched != None: 1690 if matched is not None:
1691 if not regex in matched: 1691 if not regex in matched:
1692 matched.add(regex) 1692 matched.add(regex)
1693 return pri 1693 return pri