summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake31
-rwxr-xr-xbitbake/bin/bitdoc55
2 files changed, 56 insertions, 30 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 63bd07fe34..457fbb7527 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -22,7 +22,7 @@
22# Place, Suite 330, Boston, MA 02111-1307 USA. 22# Place, Suite 330, Boston, MA 02111-1307 USA.
23 23
24import sys, os, getopt, glob, copy, os.path, re, time 24import sys, os, getopt, glob, copy, os.path, re, time
25sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) 25sys.path.insert(0,os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
26import bb 26import bb
27from bb import utils, data, parse, debug, event, fatal 27from bb import utils, data, parse, debug, event, fatal
28from sets import Set 28from sets import Set
@@ -31,7 +31,7 @@ import itertools, optparse
31parsespin = itertools.cycle( r'|/-\\' ) 31parsespin = itertools.cycle( r'|/-\\' )
32bbdebug = 0 32bbdebug = 0
33 33
34__version__ = "1.3.3" 34__version__ = "1.3.3.2"
35 35
36#============================================================================# 36#============================================================================#
37# BBParsingStatus 37# BBParsingStatus
@@ -80,7 +80,7 @@ class BBParsingStatus:
80 depends = (bb.data.getVar("DEPENDS", bb_data, True) or "").split() 80 depends = (bb.data.getVar("DEPENDS", bb_data, True) or "").split()
81 packages = (bb.data.getVar('PACKAGES', bb_data, True) or "").split() 81 packages = (bb.data.getVar('PACKAGES', bb_data, True) or "").split()
82 packages_dynamic = (bb.data.getVar('PACKAGES_DYNAMIC', bb_data, True) or "").split() 82 packages_dynamic = (bb.data.getVar('PACKAGES_DYNAMIC', bb_data, True) or "").split()
83 rprovides = Set((bb.data.getVar("RPROVIDES_%s" % pn, bb_data, 1) or "").split() + (bb.data.getVar("RPROVIDES", bb_data, 1) or "").split()) 83 rprovides = (bb.data.getVar("RPROVIDES", bb_data, 1) or "").split()
84 84
85 85
86 # build PackageName to FileName lookup table 86 # build PackageName to FileName lookup table
@@ -110,11 +110,11 @@ class BBParsingStatus:
110 110
111 # Build reverse hash for PACKAGES, so runtime dependencies 111 # Build reverse hash for PACKAGES, so runtime dependencies
112 # can be be resolved (RDEPENDS, RRECOMMENDS etc.) 112 # can be be resolved (RDEPENDS, RRECOMMENDS etc.)
113
114 for package in packages: 113 for package in packages:
115 if not package in self.packages: 114 if not package in self.packages:
116 self.packages[package] = [] 115 self.packages[package] = []
117 self.packages[package].append(file_name) 116 self.packages[package].append(file_name)
117 rprovides += (bb.data.getVar("RPROVIDES_%s" % package, bb_data, 1) or "").split()
118 118
119 for package in packages_dynamic: 119 for package in packages_dynamic:
120 if not package in self.packages_dynamic: 120 if not package in self.packages_dynamic:
@@ -493,6 +493,7 @@ class BBCooker:
493 493
494 if not item in self.status.providers: 494 if not item in self.status.providers:
495 bb.error("Nothing provides dependency %s" % item) 495 bb.error("Nothing provides dependency %s" % item)
496 bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
496 return 0 497 return 0
497 498
498 all_p = self.status.providers[item] 499 all_p = self.status.providers[item]
@@ -529,6 +530,7 @@ class BBCooker:
529 providers_list.append(self.status.pkg_fn[fn]) 530 providers_list.append(self.status.pkg_fn[fn])
530 bb.note("multiple providers are available (%s);" % ", ".join(providers_list)) 531 bb.note("multiple providers are available (%s);" % ", ".join(providers_list))
531 bb.note("consider defining PREFERRED_PROVIDER_%s" % item) 532 bb.note("consider defining PREFERRED_PROVIDER_%s" % item)
533 bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data))
532 self.consider_msgs_cache.append(item) 534 self.consider_msgs_cache.append(item)
533 535
534 536
@@ -539,6 +541,7 @@ class BBCooker:
539 return 1 541 return 1
540 542
541 bb.note("no buildable providers for %s" % item) 543 bb.note("no buildable providers for %s" % item)
544 bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
542 return 0 545 return 0
543 546
544 def buildRProvider( self, item , buildAllDeps ): 547 def buildRProvider( self, item , buildAllDeps ):
@@ -558,6 +561,7 @@ class BBCooker:
558 561
559 if not all_p: 562 if not all_p:
560 bb.error("Nothing provides runtime dependency %s" % (item)) 563 bb.error("Nothing provides runtime dependency %s" % (item))
564 bb.event.fire(bb.event.NoProvider(item,self.configuration.data,runtime=True))
561 return False 565 return False
562 566
563 for p in all_p: 567 for p in all_p:
@@ -592,6 +596,7 @@ class BBCooker:
592 providers_list.append(self.status.pkg_fn[fn]) 596 providers_list.append(self.status.pkg_fn[fn])
593 bb.note("multiple providers are available (%s);" % ", ".join(providers_list)) 597 bb.note("multiple providers are available (%s);" % ", ".join(providers_list))
594 bb.note("consider defining a PREFERRED_PROVIDER to match runtime %s" % item) 598 bb.note("consider defining a PREFERRED_PROVIDER to match runtime %s" % item)
599 bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data,runtime=True))
595 self.consider_msgs_cache.append(item) 600 self.consider_msgs_cache.append(item)
596 601
597 if len(preferred) > 1: 602 if len(preferred) > 1:
@@ -601,6 +606,7 @@ class BBCooker:
601 providers_list.append(self.status.pkg_fn[fn]) 606 providers_list.append(self.status.pkg_fn[fn])
602 bb.note("multiple preferred providers are available (%s);" % ", ".join(providers_list)) 607 bb.note("multiple preferred providers are available (%s);" % ", ".join(providers_list))
603 bb.note("consider defining only one PREFERRED_PROVIDER to match runtime %s" % item) 608 bb.note("consider defining only one PREFERRED_PROVIDER to match runtime %s" % item)
609 bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data,runtime=True))
604 self.consider_msgs_cache.append(item) 610 self.consider_msgs_cache.append(item)
605 611
606 # run through the list until we find one that we can build 612 # run through the list until we find one that we can build
@@ -610,6 +616,7 @@ class BBCooker:
610 return True 616 return True
611 617
612 bb.error("No buildable providers for runtime %s" % item) 618 bb.error("No buildable providers for runtime %s" % item)
619 bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
613 return False 620 return False
614 621
615 def getProvidersRun(self, rdepend): 622 def getProvidersRun(self, rdepend):
@@ -666,7 +673,9 @@ class BBCooker:
666 673
667 bb.debug(2, "Additional runtime dependencies for %s are: %s" % (item, " ".join(rdepends))) 674 bb.debug(2, "Additional runtime dependencies for %s are: %s" % (item, " ".join(rdepends)))
668 675
669 for rdepend in rdepends: 676 for rdepend in rdepends:
677 if rdepend in self.status.ignored_dependencies:
678 continue
670 if not self.buildRProvider(rdepend, buildAllDeps): 679 if not self.buildRProvider(rdepend, buildAllDeps):
671 return False 680 return False
672 return True 681 return True
@@ -880,6 +889,7 @@ class BBCooker:
880 889
881 bb.event.fire(bb.event.BuildStarted(buildname, pkgs_to_build, self.configuration.data)) 890 bb.event.fire(bb.event.BuildStarted(buildname, pkgs_to_build, self.configuration.data))
882 891
892 failures = 0
883 for k in pkgs_to_build: 893 for k in pkgs_to_build:
884 failed = False 894 failed = False
885 try: 895 try:
@@ -891,10 +901,11 @@ class BBCooker:
891 failed = True 901 failed = True
892 902
893 if failed: 903 if failed:
904 failures += failures
894 if self.configuration.abort: 905 if self.configuration.abort:
895 sys.exit(1) 906 sys.exit(1)
896 907
897 bb.event.fire(bb.event.BuildCompleted(buildname, pkgs_to_build, self.configuration.data)) 908 bb.event.fire(bb.event.BuildCompleted(buildname, pkgs_to_build, self.configuration.data, failures))
898 909
899 sys.exit( self.stats.show() ) 910 sys.exit( self.stats.show() )
900 911
@@ -1067,8 +1078,7 @@ class BBCooker:
1067# main 1078# main
1068#============================================================================# 1079#============================================================================#
1069 1080
1070if __name__ == "__main__": 1081def main():
1071
1072 parser = optparse.OptionParser( version = "BitBake Build Tool Core version %s, %%prog version %s" % ( bb.__version__, __version__ ), 1082 parser = optparse.OptionParser( version = "BitBake Build Tool Core version %s, %%prog version %s" % ( bb.__version__, __version__ ),
1073 usage = """%prog [options] [package ...] 1083 usage = """%prog [options] [package ...]
1074 1084
@@ -1120,3 +1130,8 @@ Default BBFILES are the .bb files in the current directory.""" )
1120 1130
1121 cooker = BBCooker() 1131 cooker = BBCooker()
1122 cooker.cook( BBConfiguration( options ), args[1:] ) 1132 cooker.cook( BBConfiguration( options ), args[1:] )
1133
1134
1135
1136if __name__ == "__main__":
1137 main()
diff --git a/bitbake/bin/bitdoc b/bitbake/bin/bitdoc
index 64d32945ba..84d2ee23ce 100755
--- a/bitbake/bin/bitdoc
+++ b/bitbake/bin/bitdoc
@@ -30,7 +30,7 @@ import optparse, os, sys
30# bitbake 30# bitbake
31sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) 31sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
32import bb 32import bb
33from bb import make 33import bb.parse
34from string import split, join 34from string import split, join
35 35
36__version__ = "0.0.2" 36__version__ = "0.0.2"
@@ -45,8 +45,8 @@ class HTMLFormatter:
45 one site for each key with links to the relations and groups. 45 one site for each key with links to the relations and groups.
46 46
47 index.html 47 index.html
48 keys.html 48 all_keys.html
49 groups.html 49 all_groups.html
50 groupNAME.html 50 groupNAME.html
51 keyNAME.html 51 keyNAME.html
52 """ 52 """
@@ -75,8 +75,8 @@ class HTMLFormatter:
75 return """<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> 75 return """<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
76<tr valign="middle"> 76<tr valign="middle">
77<td><a accesskey="g" href="index.html">Home</a></td> 77<td><a accesskey="g" href="index.html">Home</a></td>
78<td><a accesskey="n" href="groups.html">Groups</a></td> 78<td><a accesskey="n" href="all_groups.html">Groups</a></td>
79<td><a accesskey="u" href="keys.html">Keys</a></td> 79<td><a accesskey="u" href="all_keys.html">Keys</a></td>
80</tr></table> 80</tr></table>
81""" 81"""
82 82
@@ -89,10 +89,11 @@ class HTMLFormatter:
89 return "" 89 return ""
90 90
91 txt = "<p><b>See also:</b><br>" 91 txt = "<p><b>See also:</b><br>"
92 txts = []
92 for it in item.related(): 93 for it in item.related():
93 txt += """<a href="key%s.html">%s</a>, """ % (it, it) 94 txts.append("""<a href="key%(it)s.html">%(it)s</a>""" % vars() )
94 95
95 return txt 96 return txt + ",".join(txts)
96 97
97 def groups(self,item): 98 def groups(self,item):
98 """ 99 """
@@ -103,11 +104,12 @@ class HTMLFormatter:
103 return "" 104 return ""
104 105
105 106
106 txt = "<p><b>Seel also:</b><br>" 107 txt = "<p><b>See also:</b><br>"
108 txts = []
107 for group in item.groups(): 109 for group in item.groups():
108 txt += """<a href="group%s.html">%s</a>, """ % (group,group) 110 txts.append( """<a href="group%s.html">%s</a> """ % (group,group) )
109 111
110 return txt 112 return txt + ",".join(txts)
111 113
112 114
113 def createKeySite(self,item): 115 def createKeySite(self,item):
@@ -125,23 +127,23 @@ class HTMLFormatter:
125 127
126<div class="refsynopsisdiv"> 128<div class="refsynopsisdiv">
127<h2>Synopsis</h2> 129<h2>Synopsis</h2>
128<pre class="synopsis"> 130<p>
129%s 131%s
130</pre> 132</p>
131</div> 133</div>
132 134
133<div class="refsynopsisdiv"> 135<div class="refsynopsisdiv">
134<h2>Related Keys</h2> 136<h2>Related Keys</h2>
135<pre class="synopsis"> 137<p>
136%s 138%s
137</pre> 139</p>
138</div> 140</div>
139 141
140<div class="refsynopsisdiv"> 142<div class="refsynopsisdiv">
141<h2>Groups</h2> 143<h2>Groups</h2>
142<pre class="synopsis"> 144<p>
143%s 145%s
144</pre> 146</p>
145</div> 147</div>
146 148
147 149
@@ -181,8 +183,8 @@ class HTMLFormatter:
181<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 183<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
182%s 184%s
183<h2>Documentation Entrance</h2> 185<h2>Documentation Entrance</h2>
184<a href="groups.html">All available groups</a><br> 186<a href="all_groups.html">All available groups</a><br>
185<a href="keys.html">All available keys</a><br> 187<a href="all_keys.html">All available keys</a><br>
186</body> 188</body>
187""" % self.createNavigator() 189""" % self.createNavigator()
188 190
@@ -206,13 +208,21 @@ class HTMLFormatter:
206</body> 208</body>
207""" % (self.createNavigator(), keys) 209""" % (self.createNavigator(), keys)
208 210
209 def createGroupSite(self,gr, items): 211 def createGroupSite(self, gr, items, _description = None):
210 """ 212 """
211 Create a site for a group: 213 Create a site for a group:
212 Group the name of the group, items contain the name of the keys 214 Group the name of the group, items contain the name of the keys
213 inside this group 215 inside this group
214 """ 216 """
215 groups = "" 217 groups = ""
218 description = ""
219
220 # create a section with the group descriptions
221 if _description:
222 description += "<h2 Description of Grozp %s</h2>" % gr
223 description += _description
224
225 items.sort(lambda x,y:cmp(x.name(),y.name()))
216 for group in items: 226 for group in items:
217 groups += """<a href="key%s.html">%s</a><br>""" % (group.name(), group.name()) 227 groups += """<a href="key%s.html">%s</a><br>""" % (group.name(), group.name())
218 228
@@ -221,6 +231,7 @@ class HTMLFormatter:
221<link rel="stylesheet" href="style.css" type="text/css"> 231<link rel="stylesheet" href="style.css" type="text/css">
222<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 232<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
223%s 233%s
234%s
224<div class="refsynopsisdiv"> 235<div class="refsynopsisdiv">
225<h2>Keys in Group %s</h2> 236<h2>Keys in Group %s</h2>
226<pre class="synopsis"> 237<pre class="synopsis">
@@ -228,7 +239,7 @@ class HTMLFormatter:
228</pre> 239</pre>
229</div> 240</div>
230</body> 241</body>
231""" % (gr, self.createNavigator(), gr, groups) 242""" % (gr, self.createNavigator(), description, gr, groups)
232 243
233 244
234 245
@@ -508,10 +519,10 @@ def main():
508 f = file('index.html', 'w') 519 f = file('index.html', 'w')
509 print >> f, html_slave.createIndex() 520 print >> f, html_slave.createIndex()
510 521
511 f = file('groups.html', 'w') 522 f = file('all_groups.html', 'w')
512 print >> f, html_slave.createGroupsSite(doc) 523 print >> f, html_slave.createGroupsSite(doc)
513 524
514 f = file('keys.html', 'w') 525 f = file('all_keys.html', 'w')
515 print >> f, html_slave.createKeysSite(doc) 526 print >> f, html_slave.createKeysSite(doc)
516 527
517 # now for each group create the site 528 # now for each group create the site