summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:09 +0000
commit1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch)
treedc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/cooker.py
parent1d0c124cdf0282b8d139063409e40982f0ec9888 (diff)
downloadpoky-1fce7ecbbb004a5ad82da3eef79cfd52b276708d.tar.gz
bitbake: bitbake: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index c08af4593f..1b820d8836 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -323,7 +323,7 @@ class BBCooker:
323 # Need to preserve BB_CONSOLELOG over resets 323 # Need to preserve BB_CONSOLELOG over resets
324 consolelog = None 324 consolelog = None
325 if hasattr(self, "data"): 325 if hasattr(self, "data"):
326 consolelog = self.data.getVar("BB_CONSOLELOG", True) 326 consolelog = self.data.getVar("BB_CONSOLELOG")
327 327
328 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: 328 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
329 self.enableDataTracking() 329 self.enableDataTracking()
@@ -518,7 +518,7 @@ class BBCooker:
518 bb.msg.loggerVerboseLogs = True 518 bb.msg.loggerVerboseLogs = True
519 519
520 # Change nice level if we're asked to 520 # Change nice level if we're asked to
521 nice = self.data.getVar("BB_NICE_LEVEL", True) 521 nice = self.data.getVar("BB_NICE_LEVEL")
522 if nice: 522 if nice:
523 curnice = os.nice(0) 523 curnice = os.nice(0)
524 nice = int(nice) - curnice 524 nice = int(nice) - curnice
@@ -531,7 +531,7 @@ class BBCooker:
531 for mc in self.multiconfigs: 531 for mc in self.multiconfigs:
532 self.recipecaches[mc] = bb.cache.CacheData(self.caches_array) 532 self.recipecaches[mc] = bb.cache.CacheData(self.caches_array)
533 533
534 self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS", True)) 534 self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
535 535
536 def updateConfigOpts(self, options, environment): 536 def updateConfigOpts(self, options, environment):
537 clean = True 537 clean = True
@@ -611,7 +611,7 @@ class BBCooker:
611 fn = self.matchFile(fn) 611 fn = self.matchFile(fn)
612 fn = bb.cache.realfn2virtual(fn, cls, mc) 612 fn = bb.cache.realfn2virtual(fn, cls, mc)
613 elif len(pkgs_to_build) == 1: 613 elif len(pkgs_to_build) == 1:
614 ignore = self.expanded_data.getVar("ASSUME_PROVIDED", True) or "" 614 ignore = self.expanded_data.getVar("ASSUME_PROVIDED") or ""
615 if pkgs_to_build[0] in set(ignore.split()): 615 if pkgs_to_build[0] in set(ignore.split()):
616 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) 616 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
617 617
@@ -995,7 +995,7 @@ class BBCooker:
995 bb.data.expandKeys(localdata) 995 bb.data.expandKeys(localdata)
996 996
997 # Handle PREFERRED_PROVIDERS 997 # Handle PREFERRED_PROVIDERS
998 for p in (localdata.getVar('PREFERRED_PROVIDERS', True) or "").split(): 998 for p in (localdata.getVar('PREFERRED_PROVIDERS') or "").split():
999 try: 999 try:
1000 (providee, provider) = p.split(':') 1000 (providee, provider) = p.split(':')
1001 except: 1001 except:
@@ -1006,7 +1006,7 @@ class BBCooker:
1006 self.recipecaches[mc].preferred[providee] = provider 1006 self.recipecaches[mc].preferred[providee] = provider
1007 1007
1008 def findCoreBaseFiles(self, subdir, configfile): 1008 def findCoreBaseFiles(self, subdir, configfile):
1009 corebase = self.data.getVar('COREBASE', True) or "" 1009 corebase = self.data.getVar('COREBASE') or ""
1010 paths = [] 1010 paths = []
1011 for root, dirs, files in os.walk(corebase + '/' + subdir): 1011 for root, dirs, files in os.walk(corebase + '/' + subdir):
1012 for d in dirs: 1012 for d in dirs:
@@ -1056,7 +1056,7 @@ class BBCooker:
1056 """ 1056 """
1057 1057
1058 matches = [] 1058 matches = []
1059 bbpaths = self.data.getVar('BBPATH', True).split(':') 1059 bbpaths = self.data.getVar('BBPATH').split(':')
1060 for path in bbpaths: 1060 for path in bbpaths:
1061 dirpath = os.path.join(path, directory) 1061 dirpath = os.path.join(path, directory)
1062 if os.path.exists(dirpath): 1062 if os.path.exists(dirpath):
@@ -1078,7 +1078,7 @@ class BBCooker:
1078 1078
1079 data = self.data 1079 data = self.data
1080 # iterate configs 1080 # iterate configs
1081 bbpaths = data.getVar('BBPATH', True).split(':') 1081 bbpaths = data.getVar('BBPATH').split(':')
1082 for path in bbpaths: 1082 for path in bbpaths:
1083 confpath = os.path.join(path, "conf", var) 1083 confpath = os.path.join(path, "conf", var)
1084 if os.path.exists(confpath): 1084 if os.path.exists(confpath):
@@ -1147,7 +1147,7 @@ class BBCooker:
1147 bb.debug(1,'Processing %s in collection list' % (c)) 1147 bb.debug(1,'Processing %s in collection list' % (c))
1148 1148
1149 # Get collection priority if defined explicitly 1149 # Get collection priority if defined explicitly
1150 priority = self.data.getVar("BBFILE_PRIORITY_%s" % c, True) 1150 priority = self.data.getVar("BBFILE_PRIORITY_%s" % c)
1151 if priority: 1151 if priority:
1152 try: 1152 try:
1153 prio = int(priority) 1153 prio = int(priority)
@@ -1161,7 +1161,7 @@ class BBCooker:
1161 collection_priorities[c] = None 1161 collection_priorities[c] = None
1162 1162
1163 # Check dependencies and store information for priority calculation 1163 # Check dependencies and store information for priority calculation
1164 deps = self.data.getVar("LAYERDEPENDS_%s" % c, True) 1164 deps = self.data.getVar("LAYERDEPENDS_%s" % c)
1165 if deps: 1165 if deps:
1166 try: 1166 try:
1167 depDict = bb.utils.explode_dep_versions2(deps) 1167 depDict = bb.utils.explode_dep_versions2(deps)
@@ -1170,7 +1170,7 @@ class BBCooker:
1170 for dep, oplist in list(depDict.items()): 1170 for dep, oplist in list(depDict.items()):
1171 if dep in collection_list: 1171 if dep in collection_list:
1172 for opstr in oplist: 1172 for opstr in oplist:
1173 layerver = self.data.getVar("LAYERVERSION_%s" % dep, True) 1173 layerver = self.data.getVar("LAYERVERSION_%s" % dep)
1174 (op, depver) = opstr.split() 1174 (op, depver) = opstr.split()
1175 if layerver: 1175 if layerver:
1176 try: 1176 try:
@@ -1191,7 +1191,7 @@ class BBCooker:
1191 collection_depends[c] = [] 1191 collection_depends[c] = []
1192 1192
1193 # Check recommends and store information for priority calculation 1193 # Check recommends and store information for priority calculation
1194 recs = self.data.getVar("LAYERRECOMMENDS_%s" % c, True) 1194 recs = self.data.getVar("LAYERRECOMMENDS_%s" % c)
1195 if recs: 1195 if recs:
1196 try: 1196 try:
1197 recDict = bb.utils.explode_dep_versions2(recs) 1197 recDict = bb.utils.explode_dep_versions2(recs)
@@ -1201,7 +1201,7 @@ class BBCooker:
1201 if rec in collection_list: 1201 if rec in collection_list:
1202 if oplist: 1202 if oplist:
1203 opstr = oplist[0] 1203 opstr = oplist[0]
1204 layerver = self.data.getVar("LAYERVERSION_%s" % rec, True) 1204 layerver = self.data.getVar("LAYERVERSION_%s" % rec)
1205 if layerver: 1205 if layerver:
1206 (op, recver) = opstr.split() 1206 (op, recver) = opstr.split()
1207 try: 1207 try:
@@ -1235,7 +1235,7 @@ class BBCooker:
1235 # Calculate all layer priorities using calc_layer_priority and store in bbfile_config_priorities 1235 # Calculate all layer priorities using calc_layer_priority and store in bbfile_config_priorities
1236 for c in collection_list: 1236 for c in collection_list:
1237 calc_layer_priority(c) 1237 calc_layer_priority(c)
1238 regex = self.data.getVar("BBFILE_PATTERN_%s" % c, True) 1238 regex = self.data.getVar("BBFILE_PATTERN_%s" % c)
1239 if regex == None: 1239 if regex == None:
1240 parselog.error("BBFILE_PATTERN_%s not defined" % c) 1240 parselog.error("BBFILE_PATTERN_%s not defined" % c)
1241 errors = True 1241 errors = True
@@ -1367,7 +1367,7 @@ class BBCooker:
1367 taskdata[mc] = bb.taskdata.TaskData(self.configuration.abort) 1367 taskdata[mc] = bb.taskdata.TaskData(self.configuration.abort)
1368 taskdata[mc].add_provider(self.data, self.recipecaches[mc], item) 1368 taskdata[mc].add_provider(self.data, self.recipecaches[mc], item)
1369 1369
1370 buildname = self.data.getVar("BUILDNAME", True) 1370 buildname = self.data.getVar("BUILDNAME")
1371 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data) 1371 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
1372 1372
1373 # Execute the runqueue 1373 # Execute the runqueue
@@ -1586,7 +1586,7 @@ class BBCooker:
1586 bb.event.fire(bb.event.SanityCheck(False), self.data) 1586 bb.event.fire(bb.event.SanityCheck(False), self.data)
1587 1587
1588 for mc in self.multiconfigs: 1588 for mc in self.multiconfigs:
1589 ignore = self.databuilder.mcdata[mc].getVar("ASSUME_PROVIDED", True) or "" 1589 ignore = self.databuilder.mcdata[mc].getVar("ASSUME_PROVIDED") or ""
1590 self.recipecaches[mc].ignored_dependencies = set(ignore.split()) 1590 self.recipecaches[mc].ignored_dependencies = set(ignore.split())
1591 1591
1592 for dep in self.configuration.extra_assume_provided: 1592 for dep in self.configuration.extra_assume_provided:
@@ -1627,7 +1627,7 @@ class BBCooker:
1627 if len(pkgs_to_build) == 0: 1627 if len(pkgs_to_build) == 0:
1628 raise NothingToBuild 1628 raise NothingToBuild
1629 1629
1630 ignore = (self.expanded_data.getVar("ASSUME_PROVIDED", True) or "").split() 1630 ignore = (self.expanded_data.getVar("ASSUME_PROVIDED") or "").split()
1631 for pkg in pkgs_to_build: 1631 for pkg in pkgs_to_build:
1632 if pkg in ignore: 1632 if pkg in ignore:
1633 parselog.warning("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg) 1633 parselog.warning("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg)
@@ -1797,7 +1797,7 @@ class CookerCollectFiles(object):
1797 1797
1798 collectlog.debug(1, "collecting .bb files") 1798 collectlog.debug(1, "collecting .bb files")
1799 1799
1800 files = (config.getVar( "BBFILES", True) or "").split() 1800 files = (config.getVar( "BBFILES") or "").split()
1801 config.setVar("BBFILES", " ".join(files)) 1801 config.setVar("BBFILES", " ".join(files))
1802 1802
1803 # Sort files by priority 1803 # Sort files by priority
@@ -1827,7 +1827,7 @@ class CookerCollectFiles(object):
1827 if g not in newfiles: 1827 if g not in newfiles:
1828 newfiles.append(g) 1828 newfiles.append(g)
1829 1829
1830 bbmask = config.getVar('BBMASK', True) 1830 bbmask = config.getVar('BBMASK')
1831 1831
1832 if bbmask: 1832 if bbmask:
1833 # First validate the individual regular expressions and ignore any 1833 # First validate the individual regular expressions and ignore any
@@ -1923,7 +1923,7 @@ class CookerCollectFiles(object):
1923 1923
1924 for collection, pattern, regex, _ in self.bbfile_config_priorities: 1924 for collection, pattern, regex, _ in self.bbfile_config_priorities:
1925 if regex in unmatched: 1925 if regex in unmatched:
1926 if d.getVar('BBFILE_PATTERN_IGNORE_EMPTY_%s' % collection, True) != '1': 1926 if d.getVar('BBFILE_PATTERN_IGNORE_EMPTY_%s' % collection) != '1':
1927 collectlog.warning("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) 1927 collectlog.warning("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
1928 1928
1929 return priorities 1929 return priorities
@@ -2080,7 +2080,7 @@ class CookerParser(object):
2080 self.toparse = self.total - len(self.fromcache) 2080 self.toparse = self.total - len(self.fromcache)
2081 self.progress_chunk = int(max(self.toparse / 100, 1)) 2081 self.progress_chunk = int(max(self.toparse / 100, 1))
2082 2082
2083 self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or 2083 self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS") or
2084 multiprocessing.cpu_count()), len(self.willparse)) 2084 multiprocessing.cpu_count()), len(self.willparse))
2085 2085
2086 self.start() 2086 self.start()