summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
committerRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
commitb26a945734ce271aa7d443ff9e96fe2851b21138 (patch)
treef540b8d58a7411cf0cabe5c8f4ad40f9f597352a /bitbake/bin
parent3cd47ad235d54a9c539ae6fe4a5a2b4b5f7e5621 (diff)
downloadopenembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.gz
Update to latest bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
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 @@
# Place, Suite 330, Boston, MA 02111-1307 USA.
import sys, os, getopt, glob, copy, os.path, re, time
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
+sys.path.insert(0,os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
import bb
from bb import utils, data, parse, debug, event, fatal
from sets import Set
@@ -31,7 +31,7 @@ import itertools, optparse
parsespin = itertools.cycle( r'|/-\\' )
bbdebug = 0
-__version__ = "1.3.3"
+__version__ = "1.3.3.2"
#============================================================================#
# BBParsingStatus
@@ -80,7 +80,7 @@ class BBParsingStatus:
depends = (bb.data.getVar("DEPENDS", bb_data, True) or "").split()
packages = (bb.data.getVar('PACKAGES', bb_data, True) or "").split()
packages_dynamic = (bb.data.getVar('PACKAGES_DYNAMIC', bb_data, True) or "").split()
- rprovides = Set((bb.data.getVar("RPROVIDES_%s" % pn, bb_data, 1) or "").split() + (bb.data.getVar("RPROVIDES", bb_data, 1) or "").split())
+ rprovides = (bb.data.getVar("RPROVIDES", bb_data, 1) or "").split()
# build PackageName to FileName lookup table
@@ -110,11 +110,11 @@ class BBParsingStatus:
# Build reverse hash for PACKAGES, so runtime dependencies
# can be be resolved (RDEPENDS, RRECOMMENDS etc.)
-
for package in packages:
if not package in self.packages:
self.packages[package] = []
self.packages[package].append(file_name)
+ rprovides += (bb.data.getVar("RPROVIDES_%s" % package, bb_data, 1) or "").split()
for package in packages_dynamic:
if not package in self.packages_dynamic:
@@ -493,6 +493,7 @@ class BBCooker:
if not item in self.status.providers:
bb.error("Nothing provides dependency %s" % item)
+ bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
return 0
all_p = self.status.providers[item]
@@ -529,6 +530,7 @@ class BBCooker:
providers_list.append(self.status.pkg_fn[fn])
bb.note("multiple providers are available (%s);" % ", ".join(providers_list))
bb.note("consider defining PREFERRED_PROVIDER_%s" % item)
+ bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data))
self.consider_msgs_cache.append(item)
@@ -539,6 +541,7 @@ class BBCooker:
return 1
bb.note("no buildable providers for %s" % item)
+ bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
return 0
def buildRProvider( self, item , buildAllDeps ):
@@ -558,6 +561,7 @@ class BBCooker:
if not all_p:
bb.error("Nothing provides runtime dependency %s" % (item))
+ bb.event.fire(bb.event.NoProvider(item,self.configuration.data,runtime=True))
return False
for p in all_p:
@@ -592,6 +596,7 @@ class BBCooker:
providers_list.append(self.status.pkg_fn[fn])
bb.note("multiple providers are available (%s);" % ", ".join(providers_list))
bb.note("consider defining a PREFERRED_PROVIDER to match runtime %s" % item)
+ bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data,runtime=True))
self.consider_msgs_cache.append(item)
if len(preferred) > 1:
@@ -601,6 +606,7 @@ class BBCooker:
providers_list.append(self.status.pkg_fn[fn])
bb.note("multiple preferred providers are available (%s);" % ", ".join(providers_list))
bb.note("consider defining only one PREFERRED_PROVIDER to match runtime %s" % item)
+ bb.event.fire(bb.event.MultipleProviders(item,providers_list,self.configuration.data,runtime=True))
self.consider_msgs_cache.append(item)
# run through the list until we find one that we can build
@@ -610,6 +616,7 @@ class BBCooker:
return True
bb.error("No buildable providers for runtime %s" % item)
+ bb.event.fire(bb.event.NoProvider(item,self.configuration.data))
return False
def getProvidersRun(self, rdepend):
@@ -666,7 +673,9 @@ class BBCooker:
bb.debug(2, "Additional runtime dependencies for %s are: %s" % (item, " ".join(rdepends)))
- for rdepend in rdepends:
+ for rdepend in rdepends:
+ if rdepend in self.status.ignored_dependencies:
+ continue
if not self.buildRProvider(rdepend, buildAllDeps):
return False
return True
@@ -880,6 +889,7 @@ class BBCooker:
bb.event.fire(bb.event.BuildStarted(buildname, pkgs_to_build, self.configuration.data))
+ failures = 0
for k in pkgs_to_build:
failed = False
try:
@@ -891,10 +901,11 @@ class BBCooker:
failed = True
if failed:
+ failures += failures
if self.configuration.abort:
sys.exit(1)
- bb.event.fire(bb.event.BuildCompleted(buildname, pkgs_to_build, self.configuration.data))
+ bb.event.fire(bb.event.BuildCompleted(buildname, pkgs_to_build, self.configuration.data, failures))
sys.exit( self.stats.show() )
@@ -1067,8 +1078,7 @@ class BBCooker:
# main
#============================================================================#
-if __name__ == "__main__":
-
+def main():
parser = optparse.OptionParser( version = "BitBake Build Tool Core version %s, %%prog version %s" % ( bb.__version__, __version__ ),
usage = """%prog [options] [package ...]
@@ -1120,3 +1130,8 @@ Default BBFILES are the .bb files in the current directory.""" )
cooker = BBCooker()
cooker.cook( BBConfiguration( options ), args[1:] )
+
+
+
+if __name__ == "__main__":
+ 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
# bitbake
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
import bb
-from bb import make
+import bb.parse
from string import split, join
__version__ = "0.0.2"
@@ -45,8 +45,8 @@ class HTMLFormatter:
one site for each key with links to the relations and groups.
index.html
- keys.html
- groups.html
+ all_keys.html
+ all_groups.html
groupNAME.html
keyNAME.html
"""
@@ -75,8 +75,8 @@ class HTMLFormatter:
return """<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="g" href="index.html">Home</a></td>
-<td><a accesskey="n" href="groups.html">Groups</a></td>
-<td><a accesskey="u" href="keys.html">Keys</a></td>
+<td><a accesskey="n" href="all_groups.html">Groups</a></td>
+<td><a accesskey="u" href="all_keys.html">Keys</a></td>
</tr></table>
"""
@@ -89,10 +89,11 @@ class HTMLFormatter:
return ""
txt = "<p><b>See also:</b><br>"
+ txts = []
for it in item.related():
- txt += """<a href="key%s.html">%s</a>, """ % (it, it)
+ txts.append("""<a href="key%(it)s.html">%(it)s</a>""" % vars() )
- return txt
+ return txt + ",".join(txts)
def groups(self,item):
"""
@@ -103,11 +104,12 @@ class HTMLFormatter:
return ""
- txt = "<p><b>Seel also:</b><br>"
+ txt = "<p><b>See also:</b><br>"
+ txts = []
for group in item.groups():
- txt += """<a href="group%s.html">%s</a>, """ % (group,group)
+ txts.append( """<a href="group%s.html">%s</a> """ % (group,group) )
- return txt
+ return txt + ",".join(txts)
def createKeySite(self,item):
@@ -125,23 +127,23 @@ class HTMLFormatter:
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
-<pre class="synopsis">
+<p>
%s
-</pre>
+</p>
</div>
<div class="refsynopsisdiv">
<h2>Related Keys</h2>
-<pre class="synopsis">
+<p>
%s
-</pre>
+</p>
</div>
<div class="refsynopsisdiv">
<h2>Groups</h2>
-<pre class="synopsis">
+<p>
%s
-</pre>
+</p>
</div>
@@ -181,8 +183,8 @@ class HTMLFormatter:
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
%s
<h2>Documentation Entrance</h2>
-<a href="groups.html">All available groups</a><br>
-<a href="keys.html">All available keys</a><br>
+<a href="all_groups.html">All available groups</a><br>
+<a href="all_keys.html">All available keys</a><br>
</body>
""" % self.createNavigator()
@@ -206,13 +208,21 @@ class HTMLFormatter:
</body>
""" % (self.createNavigator(), keys)
- def createGroupSite(self,gr, items):
+ def createGroupSite(self, gr, items, _description = None):
"""
Create a site for a group:
Group the name of the group, items contain the name of the keys
inside this group
"""
groups = ""
+ description = ""
+
+ # create a section with the group descriptions
+ if _description:
+ description += "<h2 Description of Grozp %s</h2>" % gr
+ description += _description
+
+ items.sort(lambda x,y:cmp(x.name(),y.name()))
for group in items:
groups += """<a href="key%s.html">%s</a><br>""" % (group.name(), group.name())
@@ -221,6 +231,7 @@ class HTMLFormatter:
<link rel="stylesheet" href="style.css" type="text/css">
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
%s
+%s
<div class="refsynopsisdiv">
<h2>Keys in Group %s</h2>
<pre class="synopsis">
@@ -228,7 +239,7 @@ class HTMLFormatter:
</pre>
</div>
</body>
-""" % (gr, self.createNavigator(), gr, groups)
+""" % (gr, self.createNavigator(), description, gr, groups)
@@ -508,10 +519,10 @@ def main():
f = file('index.html', 'w')
print >> f, html_slave.createIndex()
- f = file('groups.html', 'w')
+ f = file('all_groups.html', 'w')
print >> f, html_slave.createGroupsSite(doc)
- f = file('keys.html', 'w')
+ f = file('all_keys.html', 'w')
print >> f, html_slave.createKeysSite(doc)
# now for each group create the site