diff options
author | Holger Freyther <ich@tamarin.(none)> | 2009-05-17 06:06:14 +0200 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-02-10 16:31:19 +0000 |
commit | 242a03607d752c228e909a65bf4dfbe8661d5355 (patch) | |
tree | 0a17f345f63f1fc8ee23b20c223b9194540ce21d /bitbake/lib/bb/parse/parse_py/ConfHandler.py | |
parent | bf6a4fd658a3c07edd4565c6a139537fa10fd456 (diff) | |
download | openembedded-core-contrib-242a03607d752c228e909a65bf4dfbe8661d5355.tar.gz |
bitbake: [parser] Kill obtain/localpath from the parser
With obtain it was possible to use an existing fetcher to
download a bb or config file. In practive no one has used it
and it was likely broken in regard to depends_cache... Remove
it for now, simplfiy the code.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 23316ada58..fcbf6aea15 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -47,55 +47,7 @@ def init(data): def supports(fn, d): - return localpath(fn, d)[-5:] == ".conf" - -def localpath(fn, d): - if os.path.exists(fn): - return fn - - if "://" not in fn: - return fn - - localfn = None - try: - localfn = bb.fetch.localpath(fn, d, False) - except bb.MalformedUrl: - pass - - if not localfn: - return fn - return localfn - -def obtain(fn, data): - import sys, bb - fn = bb.data.expand(fn, data) - localfn = bb.data.expand(localpath(fn, data), data) - - if localfn != fn: - dldir = bb.data.getVar('DL_DIR', data, 1) - if not dldir: - bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: DL_DIR not defined") - return localfn - bb.mkdirhier(dldir) - try: - bb.fetch.init([fn], data) - except bb.fetch.NoMethodError: - (type, value, traceback) = sys.exc_info() - bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: no method: %s" % value) - return localfn - - try: - bb.fetch.go(data) - except bb.fetch.MissingParameterError: - (type, value, traceback) = sys.exc_info() - bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: missing parameters: %s" % value) - return localfn - except bb.fetch.FetchError: - (type, value, traceback) = sys.exc_info() - bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: failed: %s" % value) - return localfn - return localfn - + return fn[-5:] == ".conf" def include(oldfn, fn, data, error_out): """ @@ -136,7 +88,6 @@ def handle(fn, data, include = 0): else: oldfile = bb.data.getVar('FILE', data) - fn = obtain(fn, data) if not os.path.isabs(fn): f = None bbpath = bb.data.getVar("BBPATH", data, 1) or [] |