diff options
author | Yu Ke <ke.yu@intel.com> | 2011-01-08 16:40:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 20:21:15 +0000 |
commit | 2892cbfb114de1d2e2b5b479d5f928646ce5c831 (patch) | |
tree | 42d582a58adff336fba8fccfb2b6c53a28a63352 /bitbake | |
parent | 9e3a92c04a5be4932a0324af4a74bce871126e9d (diff) | |
download | poky-2892cbfb114de1d2e2b5b479d5f928646ce5c831.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.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): | |||
546 | for m in methods: | 546 | for m in methods: |
547 | if m.supports(url, self, d): | 547 | if m.supports(url, self, d): |
548 | self.method = m | 548 | self.method = m |
549 | if hasattr(m,"urldata_init"): | ||
550 | m.urldata_init(self, d) | ||
549 | return | 551 | return |
550 | raise NoMethodError("Missing implementation for url %s" % url) | 552 | raise NoMethodError("Missing implementation for url %s" % url) |
551 | 553 | ||