summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-03 21:43:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:36:58 +0000
commit7b9d1c9479e931321d127c40118a28c6102789e6 (patch)
treeebb6a21d87445ae4e92e865e3662e1fb6ef54804 /lib/bb/fetch2/__init__.py
parentbd4a7ec55cee73297c899d7d9b9990ae72b83a04 (diff)
downloadbitbake-7b9d1c9479e931321d127c40118a28c6102789e6.tar.gz
bitbake/fetch2: Simplfy setup_srcrevs
(From Poky rev: 7e4fbfc1c1887a1a0507b60244aa53b8b1994edd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 05fd81ad4..af6ac734e 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -574,7 +574,13 @@ class FetchData(object):
raise NoMethodError("Missing implementation for url %s" % url)
if self.method.supports_srcrev():
- self.setup_srcrevs(d)
+ self.revisions = {}
+ for name in self.names:
+ self.revisions[name] = Fetch.srcrev_internal_helper(self, d, name)
+
+ # add compatibility code for non name specified case
+ if len(self.names) == 1:
+ self.revision = self.revisions[self.names[0]]
if hasattr(self.method, "urldata_init"):
self.method.urldata_init(self, d)
@@ -592,18 +598,6 @@ class FetchData(object):
self.md5 = basepath + '.md5'
self.lockfile = basepath + '.lock'
- def setup_srcrevs(self, d):
- if not self.method.supports_srcrev():
- return
-
- self.revisions = {}
- for name in self.names:
- self.revisions[name] = Fetch.srcrev_internal_helper(self, d, name)
-
- # add compatibility code for non name specified case
- if len(self.names) == 1:
- self.revision = self.revisions[self.names[0]]
-
def setup_localpath(self, d):
if not self.localpath:
self.localpath = self.method.localpath(self.url, self, d)