summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-03-24 16:56:12 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:32 +0100
commit7acc132cac873e60005516272473a55a8160b9c4 (patch)
tree2e4122862ffd856803160b6089fcb979d3efd630 /bitbake/lib/bb/cooker.py
parentbbf83fd988ca3cf9dae7d2b542a11a7c942b1702 (diff)
downloadpoky-7acc132cac873e60005516272473a55a8160b9c4.tar.gz
Formatting cleanups
(Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index a413c8a854..743e4be06b 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -181,7 +181,7 @@ class BBCooker:
181 181
182 def tryBuild(self, fn, task): 182 def tryBuild(self, fn, task):
183 """ 183 """
184 Build a provider and its dependencies. 184 Build a provider and its dependencies.
185 build_depends is a list of previous build dependencies (not runtime) 185 build_depends is a list of previous build dependencies (not runtime)
186 If build_depends is empty, we're dealing with a runtime depends 186 If build_depends is empty, we're dealing with a runtime depends
187 """ 187 """
@@ -206,7 +206,7 @@ class BBCooker:
206 206
207 # Sort by priority 207 # Sort by priority
208 for pn in pkg_pn: 208 for pn in pkg_pn:
209 (last_ver,last_file,pref_ver,pref_file) = bb.providers.findBestProvider(pn, self.configuration.data, self.status) 209 (last_ver, last_file, pref_ver, pref_file) = bb.providers.findBestProvider(pn, self.configuration.data, self.status)
210 preferred_versions[pn] = (pref_ver, pref_file) 210 preferred_versions[pn] = (pref_ver, pref_file)
211 latest_versions[pn] = (last_ver, last_file) 211 latest_versions[pn] = (last_ver, last_file)
212 212
@@ -315,7 +315,7 @@ class BBCooker:
315 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist) 315 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
316 rq.prepare_runqueue() 316 rq.prepare_runqueue()
317 317
318 seen_fnids = [] 318 seen_fnids = []
319 depend_tree = {} 319 depend_tree = {}
320 depend_tree["depends"] = {} 320 depend_tree["depends"] = {}
321 depend_tree["tdepends"] = {} 321 depend_tree["tdepends"] = {}
@@ -352,7 +352,7 @@ class BBCooker:
352 352
353 depend_tree["rdepends-pn"][pn] = [] 353 depend_tree["rdepends-pn"][pn] = []
354 for rdep in taskdata.rdepids[fnid]: 354 for rdep in taskdata.rdepids[fnid]:
355 depend_tree["rdepends-pn"][pn].append(taskdata.run_names_index[rdep]) 355 depend_tree["rdepends-pn"][pn].append(taskdata.run_names_index[rdep])
356 356
357 rdepends = self.status.rundeps[fn] 357 rdepends = self.status.rundeps[fn]
358 for package in rdepends: 358 for package in rdepends:
@@ -542,7 +542,7 @@ class BBCooker:
542 # Nomally we only register event handlers at the end of parsing .bb files 542 # Nomally we only register event handlers at the end of parsing .bb files
543 # We register any handlers we've found so far here... 543 # We register any handlers we've found so far here...
544 for var in data.getVar('__BBHANDLERS', self.configuration.data) or []: 544 for var in data.getVar('__BBHANDLERS', self.configuration.data) or []:
545 bb.event.register(var,bb.data.getVar(var, self.configuration.data)) 545 bb.event.register(var, bb.data.getVar(var, self.configuration.data))
546 546
547 bb.fetch.fetcher_init(self.configuration.data) 547 bb.fetch.fetcher_init(self.configuration.data)
548 548
@@ -583,7 +583,7 @@ class BBCooker:
583 """ 583 """
584 if not bb.data.getVar("BUILDNAME", self.configuration.data): 584 if not bb.data.getVar("BUILDNAME", self.configuration.data):
585 bb.data.setVar("BUILDNAME", os.popen('date +%Y%m%d%H%M').readline().strip(), self.configuration.data) 585 bb.data.setVar("BUILDNAME", os.popen('date +%Y%m%d%H%M').readline().strip(), self.configuration.data)
586 bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S',time.gmtime()), self.configuration.data) 586 bb.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()), self.configuration.data)
587 587
588 def matchFiles(self, buildfile): 588 def matchFiles(self, buildfile):
589 """ 589 """
@@ -775,10 +775,10 @@ class BBCooker:
775 775
776 ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or "" 776 ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or ""
777 self.status.ignored_dependencies = set(ignore.split()) 777 self.status.ignored_dependencies = set(ignore.split())
778 778
779 for dep in self.configuration.extra_assume_provided: 779 for dep in self.configuration.extra_assume_provided:
780 self.status.ignored_dependencies.add(dep) 780 self.status.ignored_dependencies.add(dep)
781 781
782 self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) ) 782 self.handleCollections( bb.data.getVar("BBFILE_COLLECTIONS", self.configuration.data, 1) )
783 783
784 bb.msg.debug(1, bb.msg.domain.Collection, "collecting .bb files") 784 bb.msg.debug(1, bb.msg.domain.Collection, "collecting .bb files")
@@ -816,7 +816,7 @@ class BBCooker:
816 for f in contents: 816 for f in contents:
817 (root, ext) = os.path.splitext(f) 817 (root, ext) = os.path.splitext(f)
818 if ext == ".bb": 818 if ext == ".bb":
819 bbfiles.append(os.path.abspath(os.path.join(os.getcwd(),f))) 819 bbfiles.append(os.path.abspath(os.path.join(os.getcwd(), f)))
820 return bbfiles 820 return bbfiles
821 821
822 def find_bbfiles( self, path ): 822 def find_bbfiles( self, path ):
@@ -828,7 +828,7 @@ class BBCooker:
828 for ignored in ('SCCS', 'CVS', '.svn'): 828 for ignored in ('SCCS', 'CVS', '.svn'):
829 if ignored in dirs: 829 if ignored in dirs:
830 dirs.remove(ignored) 830 dirs.remove(ignored)
831 found += [join(dir,f) for f in files if f.endswith('.bb')] 831 found += [join(dir, f) for f in files if f.endswith('.bb')]
832 832
833 return found 833 return found
834 834
@@ -912,9 +912,9 @@ class BBCooker:
912 pout.close() 912 pout.close()
913 else: 913 else:
914 self.server.serve_forever() 914 self.server.serve_forever()
915 915
916 bb.event.fire(CookerExit(), self.configuration.event_data) 916 bb.event.fire(CookerExit(), self.configuration.event_data)
917 917
918class CookerExit(bb.event.Event): 918class CookerExit(bb.event.Event):
919 """ 919 """
920 Notify clients of the Cooker shutdown 920 Notify clients of the Cooker shutdown
@@ -984,4 +984,3 @@ class CookerParser:
984 raise ParsingErrorsFound 984 raise ParsingErrorsFound
985 return False 985 return False
986 return True 986 return True
987