summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-21 18:11:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-22 13:59:56 +0100
commita46fac74c3372cfcd1cb639c058bd416d0ea3b64 (patch)
treed45869ce2d02810dc5ce8fb6e83a2d8d74859fb8
parent980d658f3f1e6c5b459f741385533a11d35009ca (diff)
downloadpoky-a46fac74c3372cfcd1cb639c058bd416d0ea3b64.tar.gz
bitbake: bitbake/cooker: minor refactor of parseConfiguration()
All calls to parseConfiguration set self.status and call self.handleCollections() afterwards, so just do this inside parseConfiguration() itself. (Bitbake rev: 3c2322d8a6ce15e20adb07a61aa321d884a9bcca) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cooker.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 23fffc97bc..1737e548cf 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -219,6 +219,12 @@ class BBCooker:
219 nice = int(nice) - curnice 219 nice = int(nice) - curnice
220 buildlog.verbose("Renice to %s " % os.nice(nice)) 220 buildlog.verbose("Renice to %s " % os.nice(nice))
221 221
222 if self.status:
223 del self.status
224 self.status = bb.cache.CacheData(self.caches_array)
225
226 self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) )
227
222 def parseCommandLine(self): 228 def parseCommandLine(self):
223 # Parse any commandline into actions 229 # Parse any commandline into actions
224 self.commandlineAction = {'action':None, 'msg':None} 230 self.commandlineAction = {'action':None, 'msg':None}
@@ -298,8 +304,6 @@ class BBCooker:
298 # Parse the configuration here. We need to do it explicitly here since 304 # Parse the configuration here. We need to do it explicitly here since
299 # this showEnvironment() code path doesn't use the cache 305 # this showEnvironment() code path doesn't use the cache
300 self.parseConfiguration() 306 self.parseConfiguration()
301 self.status = bb.cache.CacheData(self.caches_array)
302 self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) )
303 307
304 fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile) 308 fn, cls = bb.cache.Cache.virtualfn2realfn(buildfile)
305 fn = self.matchFile(fn) 309 fn = self.matchFile(fn)
@@ -1035,8 +1039,6 @@ class BBCooker:
1035 # Parse the configuration here. We need to do it explicitly here since 1039 # Parse the configuration here. We need to do it explicitly here since
1036 # buildFile() doesn't use the cache 1040 # buildFile() doesn't use the cache
1037 self.parseConfiguration() 1041 self.parseConfiguration()
1038 self.status = bb.cache.CacheData(self.caches_array)
1039 self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) )
1040 1042
1041 # If we are told to do the None task then query the default task 1043 # If we are told to do the None task then query the default task
1042 if (task == None): 1044 if (task == None):
@@ -1186,18 +1188,12 @@ class BBCooker:
1186 if self.state != state.parsing: 1188 if self.state != state.parsing:
1187 self.parseConfiguration () 1189 self.parseConfiguration ()
1188 1190
1189 if self.status:
1190 del self.status
1191 self.status = bb.cache.CacheData(self.caches_array)
1192
1193 ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or "" 1191 ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or ""
1194 self.status.ignored_dependencies = set(ignore.split()) 1192 self.status.ignored_dependencies = set(ignore.split())
1195 1193
1196 for dep in self.configuration.extra_assume_provided: 1194 for dep in self.configuration.extra_assume_provided:
1197 self.status.ignored_dependencies.add(dep) 1195 self.status.ignored_dependencies.add(dep)
1198 1196
1199 self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) )
1200
1201 (filelist, masked) = self.collect_bbfiles() 1197 (filelist, masked) = self.collect_bbfiles()
1202 self.configuration.data.renameVar("__depends", "__base_depends") 1198 self.configuration.data.renameVar("__depends", "__base_depends")
1203 1199