diff options
-rwxr-xr-x | bitbake/bin/bitbake | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/__init__.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/build.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/cache.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/event.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/repo.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/msg.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/shell.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 23 |
15 files changed, 34 insertions, 41 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index ba84d2de7f..3400dae6e6 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -22,7 +22,7 @@ | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import sys, os, getopt, re, time, optparse, xmlrpclib | 25 | import sys, os, optparse |
26 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), | 26 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), |
27 | 'lib')) | 27 | 'lib')) |
28 | 28 | ||
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 3ba6beb2c1..7e2933eb89 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -53,7 +53,8 @@ __all__ = [ | |||
53 | "providers", | 53 | "providers", |
54 | ] | 54 | ] |
55 | 55 | ||
56 | import sys, os, types, re, string | 56 | import os |
57 | import bb.msg | ||
57 | 58 | ||
58 | if "BBDEBUG" in os.environ: | 59 | if "BBDEBUG" in os.environ: |
59 | level = int(os.environ["BBDEBUG"]) | 60 | level = int(os.environ["BBDEBUG"]) |
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 7ca1663b7c..1882733a5f 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -200,7 +200,6 @@ def exec_func(func, d, dirs = None): | |||
200 | 200 | ||
201 | def exec_func_python(func, d, runfile, logfile): | 201 | def exec_func_python(func, d, runfile, logfile): |
202 | """Execute a python BB 'function'""" | 202 | """Execute a python BB 'function'""" |
203 | import re, os | ||
204 | 203 | ||
205 | bbfile = bb.data.getVar('FILE', d, 1) | 204 | bbfile = bb.data.getVar('FILE', d, 1) |
206 | tmp = "def " + func + "(d):\n%s" % data.getVar(func, d) | 205 | tmp = "def " + func + "(d):\n%s" % data.getVar(func, d) |
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 300acc5fc6..0d165aec2f 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -28,7 +28,7 @@ | |||
28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
29 | 29 | ||
30 | 30 | ||
31 | import os, re | 31 | import os |
32 | import bb.data | 32 | import bb.data |
33 | import bb.utils | 33 | import bb.utils |
34 | 34 | ||
@@ -452,14 +452,13 @@ class Cache: | |||
452 | Return the data and whether parsing resulted in the file being skipped | 452 | Return the data and whether parsing resulted in the file being skipped |
453 | """ | 453 | """ |
454 | 454 | ||
455 | import bb | 455 | from bb import data, parse |
456 | from bb import utils, data, parse, debug, event, fatal | ||
457 | 456 | ||
458 | # expand tmpdir to include this topdir | 457 | # expand tmpdir to include this topdir |
459 | data.setVar('TMPDIR', data.getVar('TMPDIR', config, 1) or "", config) | 458 | data.setVar('TMPDIR', data.getVar('TMPDIR', config, 1) or "", config) |
460 | bbfile_loc = os.path.abspath(os.path.dirname(bbfile)) | 459 | bbfile_loc = os.path.abspath(os.path.dirname(bbfile)) |
461 | oldpath = os.path.abspath(os.getcwd()) | 460 | oldpath = os.path.abspath(os.getcwd()) |
462 | if bb.parse.cached_mtime_noerror(bbfile_loc): | 461 | if parse.cached_mtime_noerror(bbfile_loc): |
463 | os.chdir(bbfile_loc) | 462 | os.chdir(bbfile_loc) |
464 | bb_data = data.init_db(config) | 463 | bb_data = data.init_db(config) |
465 | try: | 464 | try: |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 743e4be06b..6090efcad9 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -22,11 +22,10 @@ | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import sys, os, getopt, glob, copy, os.path, re, time | 25 | import sys, os, glob, os.path, re, time |
26 | import bb | 26 | import bb |
27 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue | 27 | from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue |
28 | from bb import command | 28 | import sre_constants |
29 | import itertools, sre_constants | ||
30 | 29 | ||
31 | class MultipleMatches(Exception): | 30 | class MultipleMatches(Exception): |
32 | """ | 31 | """ |
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 5ff0b37bfc..7f46b4abb9 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -28,11 +28,10 @@ BitBake build tools. | |||
28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 28 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
29 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 29 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
30 | 30 | ||
31 | import copy, os, re, sys, time, types | 31 | import copy, re, sys, types |
32 | import bb | 32 | import bb |
33 | from bb import utils, methodpool | 33 | from bb import utils |
34 | from bb.COW import COWDictBase | 34 | from bb.COW import COWDictBase |
35 | from new import classobj | ||
36 | 35 | ||
37 | 36 | ||
38 | __setvar_keyword__ = ["_append", "_prepend"] | 37 | __setvar_keyword__ = ["_append", "_prepend"] |
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 456b89caff..f0690b4f2b 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
@@ -22,7 +22,7 @@ BitBake build tools. | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import os, re, sys | 25 | import os, sys |
26 | import warnings | 26 | import warnings |
27 | import bb.utils | 27 | import bb.utils |
28 | import pickle | 28 | import pickle |
diff --git a/bitbake/lib/bb/fetch/repo.py b/bitbake/lib/bb/fetch/repo.py index 34c32fe0bb..883310b019 100644 --- a/bitbake/lib/bb/fetch/repo.py +++ b/bitbake/lib/bb/fetch/repo.py | |||
@@ -23,11 +23,10 @@ BitBake "Fetch" repo (git) implementation | |||
23 | # with this program; if not, write to the Free Software Foundation, Inc., | 23 | # with this program; if not, write to the Free Software Foundation, Inc., |
24 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 24 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
25 | 25 | ||
26 | import os, re | 26 | import os |
27 | import bb | 27 | import bb |
28 | from bb import data | 28 | from bb import data |
29 | from bb.fetch import Fetch | 29 | from bb.fetch import Fetch |
30 | from bb.fetch import FetchError | ||
31 | from bb.fetch import runfetchcmd | 30 | from bb.fetch import runfetchcmd |
32 | 31 | ||
33 | class Repo(Fetch): | 32 | class Repo(Fetch): |
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 17d1a0852b..788e1dddf7 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py | |||
@@ -22,9 +22,10 @@ Message handling infrastructure for bitbake | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import sys, bb | 25 | import sys |
26 | import collections | 26 | import collections |
27 | from bb import event | 27 | import bb |
28 | import bb.event | ||
28 | 29 | ||
29 | debug_level = collections.defaultdict(lambda: 0) | 30 | debug_level = collections.defaultdict(lambda: 0) |
30 | verbose = False | 31 | verbose = False |
@@ -54,7 +55,7 @@ class MsgBase(bb.event.Event): | |||
54 | 55 | ||
55 | def __init__(self, msg): | 56 | def __init__(self, msg): |
56 | self._message = msg | 57 | self._message = msg |
57 | event.Event.__init__(self) | 58 | bb.event.Event.__init__(self) |
58 | 59 | ||
59 | class MsgDebug(MsgBase): | 60 | class MsgDebug(MsgBase): |
60 | """Debug Message""" | 61 | """Debug Message""" |
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 6d4f285626..a586c5cde1 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -22,6 +22,7 @@ | |||
22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
23 | 23 | ||
24 | import bb, re, string | 24 | import bb, re, string |
25 | from bb import methodpool | ||
25 | from itertools import chain | 26 | from itertools import chain |
26 | 27 | ||
27 | __word__ = re.compile(r"\S+") | 28 | __word__ = re.compile(r"\S+") |
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index f9f185ff71..c053b5bfdf 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -25,12 +25,12 @@ | |||
25 | # with this program; if not, write to the Free Software Foundation, Inc., | 25 | # with this program; if not, write to the Free Software Foundation, Inc., |
26 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 26 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
27 | 27 | ||
28 | import re, bb, os, sys, time, string | 28 | import re, bb, os |
29 | import bb.fetch, bb.build, bb.utils | 29 | import bb.fetch, bb.build, bb.utils |
30 | from bb import data, fetch | 30 | from bb import data |
31 | 31 | ||
32 | from ConfHandler import include, init | 32 | from ConfHandler import include, init |
33 | from bb.parse import ParseError, resolve_file, ast | 33 | from bb.parse import resolve_file, ast |
34 | 34 | ||
35 | # For compatibility | 35 | # For compatibility |
36 | from bb.parse import vars_from_file | 36 | from bb.parse import vars_from_file |
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index e50acbe5e1..8e17182ba7 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -24,7 +24,7 @@ | |||
24 | # with this program; if not, write to the Free Software Foundation, Inc., | 24 | # with this program; if not, write to the Free Software Foundation, Inc., |
25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
26 | 26 | ||
27 | import re, bb.data, os, sys | 27 | import re, bb.data, os |
28 | import bb.utils | 28 | import bb.utils |
29 | from bb.parse import ParseError, resolve_file, ast | 29 | from bb.parse import ParseError, resolve_file, ast |
30 | 30 | ||
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 2ecfd09469..9881315b9d 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -22,8 +22,8 @@ Handles preparation and execution of a queue of tasks | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | from bb import msg, data, event, mkdirhier, utils | ||
26 | import bb, os, sys | 25 | import bb, os, sys |
26 | from bb import msg, data, event | ||
27 | import signal | 27 | import signal |
28 | import stat | 28 | import stat |
29 | import fcntl | 29 | import fcntl |
diff --git a/bitbake/lib/bb/shell.py b/bitbake/lib/bb/shell.py index 512bcbf07a..71dd599ed6 100644 --- a/bitbake/lib/bb/shell.py +++ b/bitbake/lib/bb/shell.py | |||
@@ -56,8 +56,8 @@ try: | |||
56 | set | 56 | set |
57 | except NameError: | 57 | except NameError: |
58 | from sets import Set as set | 58 | from sets import Set as set |
59 | import sys, os, readline, socket, httplib, urllib, commands, popen2, copy, shlex, Queue, fnmatch | 59 | import sys, os, readline, socket, httplib, urllib, commands, popen2, shlex, Queue, fnmatch |
60 | from bb import data, parse, build, fatal, cache, taskdata, runqueue, providers as Providers | 60 | from bb import data, parse, build, cache, taskdata, runqueue, providers as Providers |
61 | 61 | ||
62 | __version__ = "0.5.3.1" | 62 | __version__ = "0.5.3.1" |
63 | __credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> | 63 | __credits__ = """BitBake Shell Version %s (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> |
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 93c158c604..132d5e56b2 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -19,7 +19,11 @@ BitBake Utility Functions | |||
19 | # with this program; if not, write to the Free Software Foundation, Inc., | 19 | # with this program; if not, write to the Free Software Foundation, Inc., |
20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
21 | 21 | ||
22 | import re, fcntl, os, types, bb, string, stat, shutil, time | 22 | import re, fcntl, os, types, string, stat, shutil, time |
23 | import sys | ||
24 | import bb | ||
25 | import errno | ||
26 | import bb.msg | ||
23 | from commands import getstatusoutput | 27 | from commands import getstatusoutput |
24 | 28 | ||
25 | # Version comparison | 29 | # Version comparison |
@@ -287,8 +291,6 @@ def _print_trace(body, line): | |||
287 | """ | 291 | """ |
288 | Print the Environment of a Text Body | 292 | Print the Environment of a Text Body |
289 | """ | 293 | """ |
290 | import bb | ||
291 | |||
292 | # print the environment of the method | 294 | # print the environment of the method |
293 | bb.msg.error(bb.msg.domain.Util, "Printing the environment of the function") | 295 | bb.msg.error(bb.msg.domain.Util, "Printing the environment of the function") |
294 | min_line = max(1, line-4) | 296 | min_line = max(1, line-4) |
@@ -305,8 +307,6 @@ def better_compile(text, file, realfile, mode = "exec"): | |||
305 | try: | 307 | try: |
306 | return compile(text, file, mode) | 308 | return compile(text, file, mode) |
307 | except Exception, e: | 309 | except Exception, e: |
308 | import bb, sys | ||
309 | |||
310 | # split the text into lines again | 310 | # split the text into lines again |
311 | body = text.split('\n') | 311 | body = text.split('\n') |
312 | bb.msg.error(bb.msg.domain.Util, "Error in compiling python function in: ", realfile) | 312 | bb.msg.error(bb.msg.domain.Util, "Error in compiling python function in: ", realfile) |
@@ -324,7 +324,7 @@ def better_exec(code, context, text, realfile): | |||
324 | print the lines that are responsible for the | 324 | print the lines that are responsible for the |
325 | error. | 325 | error. |
326 | """ | 326 | """ |
327 | import bb, sys | 327 | import bb.parse |
328 | try: | 328 | try: |
329 | exec code in _context, context | 329 | exec code in _context, context |
330 | except: | 330 | except: |
@@ -361,7 +361,6 @@ def lockfile(name): | |||
361 | """ | 361 | """ |
362 | path = os.path.dirname(name) | 362 | path = os.path.dirname(name) |
363 | if not os.path.isdir(path): | 363 | if not os.path.isdir(path): |
364 | import bb, sys | ||
365 | bb.msg.error(bb.msg.domain.Util, "Error, lockfile path does not exist!: %s" % path) | 364 | bb.msg.error(bb.msg.domain.Util, "Error, lockfile path does not exist!: %s" % path) |
366 | sys.exit(1) | 365 | sys.exit(1) |
367 | 366 | ||
@@ -467,8 +466,6 @@ def filter_environment(good_vars): | |||
467 | are not known and may influence the build in a negative way. | 466 | are not known and may influence the build in a negative way. |
468 | """ | 467 | """ |
469 | 468 | ||
470 | import bb | ||
471 | |||
472 | removed_vars = [] | 469 | removed_vars = [] |
473 | for key in os.environ.keys(): | 470 | for key in os.environ.keys(): |
474 | if key in good_vars: | 471 | if key in good_vars: |
@@ -509,7 +506,7 @@ def build_environment(d): | |||
509 | """ | 506 | """ |
510 | Build an environment from all exported variables. | 507 | Build an environment from all exported variables. |
511 | """ | 508 | """ |
512 | import bb | 509 | import bb.data |
513 | for var in bb.data.keys(d): | 510 | for var in bb.data.keys(d): |
514 | export = bb.data.getVarFlag(var, "export", d) | 511 | export = bb.data.getVarFlag(var, "export", d) |
515 | if export: | 512 | if export: |
@@ -550,9 +547,8 @@ def mkdirhier(dir): | |||
550 | os.makedirs(dir) | 547 | os.makedirs(dir) |
551 | bb.msg.debug(2, bb.msg.domain.Util, "created " + dir) | 548 | bb.msg.debug(2, bb.msg.domain.Util, "created " + dir) |
552 | except OSError, e: | 549 | except OSError, e: |
553 | if e.errno != 17: raise e | 550 | if e.errno != errno.EEXIST: |
554 | 551 | raise e | |
555 | import stat | ||
556 | 552 | ||
557 | def movefile(src, dest, newmtime = None, sstat = None): | 553 | def movefile(src, dest, newmtime = None, sstat = None): |
558 | """Moves a file from src to dest, preserving all permissions and | 554 | """Moves a file from src to dest, preserving all permissions and |
@@ -603,7 +599,6 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
603 | ret = os.rename(src, dest) | 599 | ret = os.rename(src, dest) |
604 | renamefailed = 0 | 600 | renamefailed = 0 |
605 | except Exception, e: | 601 | except Exception, e: |
606 | import errno | ||
607 | if e[0] != errno.EXDEV: | 602 | if e[0] != errno.EXDEV: |
608 | # Some random error. | 603 | # Some random error. |
609 | print "movefile: Failed to move", src, "to", dest, e | 604 | print "movefile: Failed to move", src, "to", dest, e |