From 2892cbfb114de1d2e2b5b479d5f928646ce5c831 Mon Sep 17 00:00:00 2001 From: Yu Ke Date: Sat, 8 Jan 2011 16:40:18 +0800 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb/fetch2') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index dd6f714d7..16cf1fa2b 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) -- cgit v1.2.3