diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-09 17:11:03 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:32 +0100 |
commit | 6623d79adaf445081e68b307355292077800d4f4 (patch) | |
tree | 219d0c9b31de4331703e1a81d3b7f233ac0169cf /bitbake | |
parent | 1569c1ac851b56bc73bf8ccd5270cbdd9da68a2f (diff) | |
download | poky-6623d79adaf445081e68b307355292077800d4f4.tar.gz |
Stop using functions via 'bb' that were moved from there to other modules
(Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 15292c6b7b..b1b5eda35b 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -118,9 +118,9 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
118 | # bb.msg.note(1, bb.msg.domain.Fetcher, "uri_replace: operating on %s" % uri) | 118 | # bb.msg.note(1, bb.msg.domain.Fetcher, "uri_replace: operating on %s" % uri) |
119 | if not uri or not uri_find or not uri_replace: | 119 | if not uri or not uri_find or not uri_replace: |
120 | bb.msg.debug(1, bb.msg.domain.Fetcher, "uri_replace: passed an undefined value, not replacing") | 120 | bb.msg.debug(1, bb.msg.domain.Fetcher, "uri_replace: passed an undefined value, not replacing") |
121 | uri_decoded = list(bb.decodeurl(uri)) | 121 | uri_decoded = list(decodeurl(uri)) |
122 | uri_find_decoded = list(bb.decodeurl(uri_find)) | 122 | uri_find_decoded = list(decodeurl(uri_find)) |
123 | uri_replace_decoded = list(bb.decodeurl(uri_replace)) | 123 | uri_replace_decoded = list(decodeurl(uri_replace)) |
124 | result_decoded = ['','','','','',{}] | 124 | result_decoded = ['','','','','',{}] |
125 | for i in uri_find_decoded: | 125 | for i in uri_find_decoded: |
126 | loc = uri_find_decoded.index(i) | 126 | loc = uri_find_decoded.index(i) |
@@ -141,7 +141,7 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
141 | # else: | 141 | # else: |
142 | # for j in i: | 142 | # for j in i: |
143 | # FIXME: apply replacements against options | 143 | # FIXME: apply replacements against options |
144 | return bb.encodeurl(result_decoded) | 144 | return encodeurl(result_decoded) |
145 | 145 | ||
146 | methods = [] | 146 | methods = [] |
147 | urldata_cache = {} | 147 | urldata_cache = {} |
@@ -474,7 +474,7 @@ class FetchData(object): | |||
474 | """ | 474 | """ |
475 | def __init__(self, url, d): | 475 | def __init__(self, url, d): |
476 | self.localfile = "" | 476 | self.localfile = "" |
477 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = bb.decodeurl(data.expand(url, d)) | 477 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) |
478 | self.date = Fetch.getSRCDate(self, d) | 478 | self.date = Fetch.getSRCDate(self, d) |
479 | self.url = url | 479 | self.url = url |
480 | if not self.user and "user" in self.parm: | 480 | if not self.user and "user" in self.parm: |
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 2a7897cdf2..4c7a98f330 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -29,6 +29,7 @@ __all__ = [ 'ParseError', 'SkipPackage', 'cached_mtime', 'mark_dependency', | |||
29 | handlers = [] | 29 | handlers = [] |
30 | 30 | ||
31 | import bb, os | 31 | import bb, os |
32 | import bb.utils | ||
32 | 33 | ||
33 | class ParseError(Exception): | 34 | class ParseError(Exception): |
34 | """Exception raised when parsing fails""" | 35 | """Exception raised when parsing fails""" |
@@ -82,7 +83,7 @@ def init(fn, data): | |||
82 | 83 | ||
83 | def resolve_file(fn, d): | 84 | def resolve_file(fn, d): |
84 | if not os.path.isabs(fn): | 85 | if not os.path.isabs(fn): |
85 | fn = bb.which(bb.data.getVar("BBPATH", d, 1), fn) | 86 | fn = bb.utils.which(bb.data.getVar("BBPATH", d, 1), fn) |
86 | if not fn: | 87 | if not fn: |
87 | raise IOError("file %s not found" % fn) | 88 | raise IOError("file %s not found" % fn) |
88 | 89 | ||
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 6baf94554c..5c02299524 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -25,6 +25,7 @@ | |||
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, sys |
28 | import bb.utils | ||
28 | from bb.parse import ParseError, resolve_file, ast | 29 | from bb.parse import ParseError, resolve_file, ast |
29 | 30 | ||
30 | #__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}]+)\s*(?P<colon>:)?(?P<ques>\?)?=\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$") | 31 | #__config_regexp__ = re.compile( r"(?P<exp>export\s*)?(?P<var>[a-zA-Z0-9\-_+.${}]+)\s*(?P<colon>:)?(?P<ques>\?)?=\s*(?P<apo>['\"]?)(?P<value>.*)(?P=apo)$") |
@@ -60,7 +61,7 @@ def include(oldfn, fn, data, error_out): | |||
60 | if not os.path.isabs(fn): | 61 | if not os.path.isabs(fn): |
61 | dname = os.path.dirname(oldfn) | 62 | dname = os.path.dirname(oldfn) |
62 | bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1)) | 63 | bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1)) |
63 | abs_fn = bb.which(bbpath, fn) | 64 | abs_fn = bb.utils.which(bbpath, fn) |
64 | if abs_fn: | 65 | if abs_fn: |
65 | fn = abs_fn | 66 | fn = abs_fn |
66 | 67 | ||