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.

Signed-off-by: Yu Ke <ke.yu@intel.com>
This commit is contained in:
Yu Ke authored and Richard Purdie committed 2011-01-10 20:21:15 +00:00
1 parent 9e3a92c04a
commit 2892cbfb11
1 file changed
+2
+2
View File
@@ -546,6 +546,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)