X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fbb%2F__init__.py;h=d382f252418150221f0cc2835acc539d9bb3645a;hb=d8073f1bfe1f259579b7b7400e5ae782187d3253;hp=5e389610f8120c51893f4dbbd2be047658d44cce;hpb=00e7ab206e0836fb4c905c48ef69bd1685cb628e;p=vuplus_bitbake diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py index 5e38961..d382f25 100644 --- a/lib/bb/__init__.py +++ b/lib/bb/__init__.py @@ -20,10 +20,10 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA. +Place, Suite 330, Boston, MA 02111-1307 USA. """ -__version__ = "1.3.0" +__version__ = "1.3.3.3" __all__ = [ @@ -60,21 +60,13 @@ __all__ = [ "event", "build", "fetch", - "make", "manifest" ] whitespace = '\t\n\x0b\x0c\r ' lowercase = 'abcdefghijklmnopqrstuvwxyz' -import sys, os, types, re - -# -# Check for the Python version. A lot of stuff needs Python 2.3 or later -# -if sys.version_info[:3] < (2, 3, 0): - print "BitBake needs Python 2.3 or later. Please upgrade." - sys.exit(-1) +import sys, os, types, re, string #projectdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) projectdir = os.getcwd() @@ -305,13 +297,7 @@ def decodeurl(url): else: user = '' pswd = '' - #note("decodeurl: %s decoded to:" % url) - #note("decodeurl: type = '%s'" % type) - #note("decodeurl: host = '%s'" % host) - #note("decodeurl: path = '%s'" % path) - #note("decodeurl: parm = '%s'" % parm) - #note("decodeurl: user = '%s'" % user) - #note("decodeurl: pswd = '%s'" % pswd) + p = {} if parm: for s in parm.split(';'): @@ -327,22 +313,19 @@ def encodeurl(decoded): user, password, parameters). >>> encodeurl(['http', 'www.google.com', '/index.html', '', '', {}]) - - "http://www.google.com/index.html" + 'http://www.google.com/index.html' CVS with username, host and cvsroot. The cvs module to check out is in the parameters: >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}]) - - "cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" + 'cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg' Dito, but this time the username has a password part. And we also request a special tag to check out. >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}]) - - "cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;module=familiar/dist/ipkg;tag=V0-99-81" + 'cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg' """ (type, host, path, user, pswd, p) = decoded @@ -761,7 +744,7 @@ def pkgsplit(mypkg, silent=1): # verify rev revok = 0 myrev = myparts[-1] - ververify(myrev, 0) + ververify(myrev, silent) if len(myrev) and myrev[0] == "r": try: string.atoi(myrev[1:]) @@ -816,7 +799,7 @@ def catpkgsplit(mydata,silent=1): >>> catpkgsplit('sys-libs/glibc-1.2-r7') ['sys-libs', 'glibc', '1.2', 'r7'] >>> catpkgsplit('glibc-1.2-r7') - ['null', 'glibc', '1.2', 'r7'] + [None, 'glibc', '1.2', 'r7'] """ try: @@ -826,8 +809,6 @@ def catpkgsplit(mydata,silent=1): cat = os.path.basename(os.path.dirname(mydata)) mydata = os.path.join(cat, os.path.basename(mydata)) -# if mydata[:len(projectdir)] == projectdir: -# mydata = mydata[len(projectdir)+1:] if mydata[-3:] == '.bb': mydata = mydata[:-3]