1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

Update to bitbake 1.4.2 (latest stable branch release). This includes the caching speedups

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@371 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2006-05-09 15:44:08 +00:00
parent ed234aca98
commit 27dba1e624
28 changed files with 2394 additions and 1637 deletions
+24 -20
View File
@@ -3,7 +3,8 @@
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
##########################################################################
#
# Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>, Vanille Media
# Copyright (C) 2005-2006 Michael 'Mickey' Lauer <mickey@Vanille.de>
# Copyright (C) 2005-2006 Vanille Media
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -59,7 +60,7 @@ import sys, os, imp, readline, socket, httplib, urllib, commands, popen2, copy,
imp.load_source( "bitbake", os.path.dirname( sys.argv[0] )+"/bitbake" )
from bb import data, parse, build, fatal
__version__ = "0.5.3"
__version__ = "0.5.3.1"
__credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
Type 'help' for more information, press CTRL-D to exit.""" % __version__
@@ -263,9 +264,10 @@ class BitBakeShellCommands:
bbfile = params[0]
print "SHELL: Parsing '%s'" % bbfile
parse.update_mtime( bbfile )
bb_data, fromCache = cooker.load_bbfile( bbfile )
cooker.pkgdata[bbfile] = bb_data
if fromCache:
cooker.bb_cache.cacheValidUpdate(bbfile)
fromCache = cooker.bb_cache.loadData(bbfile, cooker)
cooker.bb_cache.sync()
if False: #from Cache
print "SHELL: File has not been updated, not reparsing"
else:
print "SHELL: Parsed"
@@ -307,7 +309,7 @@ class BitBakeShellCommands:
what, globexpr = params
if what == "files":
self._checkParsed()
for key in globfilter( cooker.pkgdata.keys(), globexpr ): print key
for key in globfilter( cooker.status.pkg_fn.keys(), globexpr ): print key
elif what == "providers":
self._checkParsed()
for key in globfilter( cooker.status.pkg_pn.keys(), globexpr ): print key
@@ -374,7 +376,7 @@ SRC_URI = ""
pasteBin.usage = "<index>"
def pasteLog( self, params ):
"""Send the last event exception error log (if there is one) to http://pastebin.com"""
"""Send the last event exception error log (if there is one) to http://oe.pastebin.com"""
if last_exception is None:
print "SHELL: No Errors yet (Phew)..."
else:
@@ -432,7 +434,8 @@ SRC_URI = ""
name, var = params
bbfile = self._findProvider( name )
if bbfile is not None:
value = cooker.pkgdata[bbfile].getVar( var, 1 )
the_data = cooker.bb_cache.loadDataFull(bbfile, cooker)
value = the_data.getVar( var, 1 )
print value
else:
print "ERROR: Nothing provides '%s'" % name
@@ -442,13 +445,14 @@ SRC_URI = ""
"""Set contents of variable defined in providee's metadata"""
name, var, value = params
bbfile = self._findProvider( name )
d = cooker.pkgdata[bbfile]
if bbfile is not None:
data.setVar( var, value, d )
print "ERROR: Sorry, this functionality is currently broken"
#d = cooker.pkgdata[bbfile]
#data.setVar( var, value, d )
# mark the change semi persistant
cooker.pkgdata.setDirty(bbfile, d)
print "OK"
#cooker.pkgdata.setDirty(bbfile, d)
#print "OK"
else:
print "ERROR: Nothing provides '%s'" % name
poke.usage = "<providee> <variable> <value>"
@@ -458,7 +462,7 @@ SRC_URI = ""
what = params[0]
if what == "files":
self._checkParsed()
for key in cooker.pkgdata.keys(): print key
for key in cooker.status.pkg_fn.keys(): print key
elif what == "providers":
self._checkParsed()
for key in cooker.status.providers.keys(): print key
@@ -555,14 +559,14 @@ SRC_URI = ""
def completeFilePath( bbfile ):
"""Get the complete bbfile path"""
if not cooker.pkgdata: return bbfile
for key in cooker.pkgdata.keys():
if not cooker.status.pkg_fn: return bbfile
for key in cooker.status.pkg_fn.keys():
if key.endswith( bbfile ):
return key
return bbfile
def sendToPastebin( content ):
"""Send content to http://www.pastebin.com"""
"""Send content to http://oe.pastebin.com"""
mydata = {}
mydata["parent_pid"] = ""
mydata["format"] = "bash"
@@ -572,7 +576,7 @@ def sendToPastebin( content ):
params = urllib.urlencode( mydata )
headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
conn = httplib.HTTPConnection( "pastebin.com:80" )
conn = httplib.HTTPConnection( "oe.pastebin.com:80" )
conn.request("POST", "/", params, headers )
response = conn.getresponse()
@@ -594,10 +598,10 @@ def completer( text, state ):
if u == "<variable>":
allmatches = cooker.configuration.data.keys()
elif u == "<bbfile>":
if cooker.pkgdata is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
else: allmatches = [ x.split("/")[-1] for x in cooker.pkgdata.keys() ]
if cooker.status.pkg_fn is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
else: allmatches = [ x.split("/")[-1] for x in cooker.status.pkg_fn.keys() ]
elif u == "<providee>":
if cooker.pkgdata is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
if cooker.status.pkg_fn is None: allmatches = [ "(No Matches Available. Parsed yet?)" ]
else: allmatches = cooker.status.providers.iterkeys()
else: allmatches = [ "(No tab completion available for this command)" ]
else: allmatches = [ "(No tab completion available for this command)" ]