diff options
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r-- | bitbake/lib/bb/__init__.py | 27 |
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 | |||
23 | Place, Suite 330, Boston, MA 02111-1307 USA. | 23 | Place, 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 | ||
68 | whitespace = '\t\n\x0b\x0c\r ' | 71 | whitespace = '\t\n\x0b\x0c\r ' |
69 | lowercase = 'abcdefghijklmnopqrstuvwxyz' | 72 | lowercase = 'abcdefghijklmnopqrstuvwxyz' |
70 | 73 | ||
71 | import sys, os, types, re, string | 74 | import sys, os, types, re, string, bb |
75 | from 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]))) |
74 | projectdir = os.getcwd() | 78 | projectdir = os.getcwd() |
75 | 79 | ||
76 | debug_level = 0 | ||
77 | |||
78 | if "BBDEBUG" in os.environ: | 80 | if "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 | ||
85 | class VarExpandError(Exception): | 85 | class VarExpandError(Exception): |
86 | pass | 86 | pass |
@@ -99,22 +99,17 @@ class MalformedUrl(Exception): | |||
99 | ####################################################################### | 99 | ####################################################################### |
100 | ####################################################################### | 100 | ####################################################################### |
101 | 101 | ||
102 | debug_prepend = '' | ||
103 | |||
104 | |||
105 | def debug(lvl, *args): | 102 | def 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 | ||
109 | def note(*args): | 105 | def note(*args): |
110 | print debug_prepend + 'NOTE:', ''.join(args) | 106 | bb.msg.std_note(''.join(args)) |
111 | 107 | ||
112 | def error(*args): | 108 | def error(*args): |
113 | print debug_prepend + 'ERROR:', ''.join(args) | 109 | bb.msg.std_error(''.join(args)) |
114 | 110 | ||
115 | def fatal(*args): | 111 | def 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 | ####################################################################### |