summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/bitbake2
-rw-r--r--bitbake/lib/bb/__init__.py3
-rw-r--r--bitbake/lib/bb/build.py1
-rw-r--r--bitbake/lib/bb/cache.py7
-rw-r--r--bitbake/lib/bb/cooker.py7
-rw-r--r--bitbake/lib/bb/data_smart.py5
-rw-r--r--bitbake/lib/bb/event.py2
-rw-r--r--bitbake/lib/bb/fetch/repo.py3
-rw-r--r--bitbake/lib/bb/msg.py7
-rw-r--r--bitbake/lib/bb/parse/ast.py1
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py6
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py2
-rw-r--r--bitbake/lib/bb/runqueue.py2
-rw-r--r--bitbake/lib/bb/shell.py4
-rw-r--r--bitbake/lib/bb/utils.py23
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
25import sys, os, getopt, re, time, optparse, xmlrpclib 25import sys, os, optparse
26sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 26sys.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
56import sys, os, types, re, string 56import os
57import bb.msg
57 58
58if "BBDEBUG" in os.environ: 59if "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
201def exec_func_python(func, d, runfile, logfile): 201def 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
31import os, re 31import os
32import bb.data 32import bb.data
33import bb.utils 33import 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
25import sys, os, getopt, glob, copy, os.path, re, time 25import sys, os, glob, os.path, re, time
26import bb 26import bb
27from bb import utils, data, parse, event, cache, providers, taskdata, runqueue 27from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue
28from bb import command 28import sre_constants
29import itertools, sre_constants
30 29
31class MultipleMatches(Exception): 30class 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
31import copy, os, re, sys, time, types 31import copy, re, sys, types
32import bb 32import bb
33from bb import utils, methodpool 33from bb import utils
34from bb.COW import COWDictBase 34from bb.COW import COWDictBase
35from 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
25import os, re, sys 25import os, sys
26import warnings 26import warnings
27import bb.utils 27import bb.utils
28import pickle 28import 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
26import os, re 26import os
27import bb 27import bb
28from bb import data 28from bb import data
29from bb.fetch import Fetch 29from bb.fetch import Fetch
30from bb.fetch import FetchError
31from bb.fetch import runfetchcmd 30from bb.fetch import runfetchcmd
32 31
33class Repo(Fetch): 32class 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
25import sys, bb 25import sys
26import collections 26import collections
27from bb import event 27import bb
28import bb.event
28 29
29debug_level = collections.defaultdict(lambda: 0) 30debug_level = collections.defaultdict(lambda: 0)
30verbose = False 31verbose = 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
59class MsgDebug(MsgBase): 60class 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
24import bb, re, string 24import bb, re, string
25from bb import methodpool
25from itertools import chain 26from 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
28import re, bb, os, sys, time, string 28import re, bb, os
29import bb.fetch, bb.build, bb.utils 29import bb.fetch, bb.build, bb.utils
30from bb import data, fetch 30from bb import data
31 31
32from ConfHandler import include, init 32from ConfHandler import include, init
33from bb.parse import ParseError, resolve_file, ast 33from bb.parse import resolve_file, ast
34 34
35# For compatibility 35# For compatibility
36from bb.parse import vars_from_file 36from 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
27import re, bb.data, os, sys 27import re, bb.data, os
28import bb.utils 28import bb.utils
29from bb.parse import ParseError, resolve_file, ast 29from 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
25from bb import msg, data, event, mkdirhier, utils
26import bb, os, sys 25import bb, os, sys
26from bb import msg, data, event
27import signal 27import signal
28import stat 28import stat
29import fcntl 29import 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
57except NameError: 57except NameError:
58 from sets import Set as set 58 from sets import Set as set
59import sys, os, readline, socket, httplib, urllib, commands, popen2, copy, shlex, Queue, fnmatch 59import sys, os, readline, socket, httplib, urllib, commands, popen2, shlex, Queue, fnmatch
60from bb import data, parse, build, fatal, cache, taskdata, runqueue, providers as Providers 60from 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
22import re, fcntl, os, types, bb, string, stat, shutil, time 22import re, fcntl, os, types, string, stat, shutil, time
23import sys
24import bb
25import errno
26import bb.msg
23from commands import getstatusoutput 27from 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
555import stat
556 552
557def movefile(src, dest, newmtime = None, sstat = None): 553def 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