summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-08 16:40:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:35:45 +0000
commitffc1cf8bdbd439f70fda35e64ab7b174914b5479 (patch)
tree690cbfd9656c44db88559b8667ac824d950ff522 /lib/bb/fetch2/__init__.py
parent67f2bc9fdb5d1002b1b4f4ae9021ae78403a12de (diff)
downloadbitbake-ffc1cf8bdbd439f70fda35e64ab7b174914b5479.tar.gz
bb.fetch2: add urldata_init call for Fetch class
FetchData has some fetch method specific data, and only fetch method knows how to initialize it. originally it is mostly initialized in Fetch.localpath(). But now there is requirement to call Fetch.latest_revision() before Fetch.localpath(), thus require another earlier place for initialization. so urldata_init is introduced for this purpose. it will be called in FetchData:__init__ and make all the Fetch functions useable after that. (From Poky rev: 2892cbfb114de1d2e2b5b479d5f928646ce5c831) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 4673393d9..7e2550b41 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -541,6 +541,8 @@ class FetchData(object):
for m in methods:
if m.supports(url, self, d):
self.method = m
+ if hasattr(m,"urldata_init"):
+ m.urldata_init(self, d)
return
raise NoMethodError("Missing implementation for url %s" % url)