summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-16 15:02:15 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-16 15:02:15 +0000
commit306b7c7a9757ead077363074e7bbac2e5c03e7c5 (patch)
tree6935017a9af749c46816881c86258f514384ba1c /bitbake/lib/bb/__init__.py
parent65930a38e415ae4a0182e1cea1be838e0ada50ee (diff)
downloadpoky-306b7c7a9757ead077363074e7bbac2e5c03e7c5.tar.gz
bitbake: Upgrade from 1.4 -> 1.7.4ish
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@863 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r--bitbake/lib/bb/__init__.py27
1 files changed, 11 insertions, 16 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index c3e7a16658..61eb5f3db8 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -23,7 +23,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
23Place, Suite 330, Boston, MA 02111-1307 USA. 23Place, Suite 330, Boston, MA 02111-1307 USA.
24""" 24"""
25 25
26__version__ = "1.4.3" 26__version__ = "1.7.4"
27 27
28__all__ = [ 28__all__ = [
29 29
@@ -63,24 +63,24 @@ __all__ = [
63 "manifest", 63 "manifest",
64 "methodpool", 64 "methodpool",
65 "cache", 65 "cache",
66 "runqueue",
67 "taskdata",
68 "providers",
66 ] 69 ]
67 70
68whitespace = '\t\n\x0b\x0c\r ' 71whitespace = '\t\n\x0b\x0c\r '
69lowercase = 'abcdefghijklmnopqrstuvwxyz' 72lowercase = 'abcdefghijklmnopqrstuvwxyz'
70 73
71import sys, os, types, re, string 74import sys, os, types, re, string, bb
75from bb import msg
72 76
73#projectdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) 77#projectdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
74projectdir = os.getcwd() 78projectdir = os.getcwd()
75 79
76debug_level = 0
77
78if "BBDEBUG" in os.environ: 80if "BBDEBUG" in os.environ:
79 level = int(os.environ["BBDEBUG"]) 81 level = int(os.environ["BBDEBUG"])
80 if level: 82 if level:
81 debug_level = level 83 bb.msg.set_debug_level(level)
82 else:
83 debug_level = 0
84 84
85class VarExpandError(Exception): 85class VarExpandError(Exception):
86 pass 86 pass
@@ -99,22 +99,17 @@ class MalformedUrl(Exception):
99####################################################################### 99#######################################################################
100####################################################################### 100#######################################################################
101 101
102debug_prepend = ''
103
104
105def debug(lvl, *args): 102def debug(lvl, *args):
106 if debug_level >= lvl: 103 bb.msg.std_debug(lvl, ''.join(args))
107 print debug_prepend + 'DEBUG:', ''.join(args)
108 104
109def note(*args): 105def note(*args):
110 print debug_prepend + 'NOTE:', ''.join(args) 106 bb.msg.std_note(''.join(args))
111 107
112def error(*args): 108def error(*args):
113 print debug_prepend + 'ERROR:', ''.join(args) 109 bb.msg.std_error(''.join(args))
114 110
115def fatal(*args): 111def fatal(*args):
116 print debug_prepend + 'ERROR:', ''.join(args) 112 bb.msg.std_fatal(''.join(args))
117 sys.exit(1)
118 113
119 114
120####################################################################### 115#######################################################################