From: Yu Ke Date: Sat, 8 Jan 2011 08:40:18 +0000 (+0800) Subject: bb.fetch2: add urldata_init call for Fetch class X-Git-Tag: 2011-1~2939 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=2892cbfb114de1d2e2b5b479d5f928646ce5c831;p=openembedded-core.git 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 --- diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index dd6f714d71..16cf1fa2be 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -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)