aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2005-06-13 21:25:31 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2005-06-13 21:25:31 +0000
commit6e9cf3a2cc7e27c2e3c6d9afa7f8e9bb2f38976e (patch)
treeeb6c2476359ce8e03927efcee81a08877bdbb26f /lib/bb
parentf40cd1fecd7bbccb7cf9615bf84ef393d05899d2 (diff)
downloadbitbake-6e9cf3a2cc7e27c2e3c6d9afa7f8e9bb2f38976e.tar.gz
BitBake:
-Remove old code (python version >= 2.3 check) -Remove commented code (as we've a scm) -Fix most of the testcases (only one is failing) -by importing string -by removing new lines -by changing '"' to "'" -by reodering some elements
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/__init__.py30
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 5e389610f..25ab49eae 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -67,14 +67,7 @@ __all__ = [
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 +298,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 +314,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
@@ -816,7 +800,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 +810,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]