From e13102cd66ba59d5dde07ac0ec1e1fee1c7da21b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 13 Nov 2007 23:03:21 +0000 Subject: bitbake: Update SRCREV fetcher code to cope better with multiple SCM packages git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3145 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/lib/bb/fetch/git.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'bitbake/lib/bb/fetch/git.py') diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index cdd5a1090c..5984818f9e 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py @@ -50,13 +50,14 @@ class Git(Fetch): if 'protocol' in ud.parm: ud.proto = ud.parm['protocol'] - tag = data.getVar("SRCREV", d, 1) - if 'tag' in ud.parm: - ud.tag = ud.parm['tag'] - elif tag is "SRCREVINACTION": - ud.tag = self.latest_revision(url, ud, d) - else: - ud.tag = tag + tag = Fetch.srcrev_internal_helper(ud, d) + if tag is True: + ud.tag = self.latest_revision(url, ud, d) + elif tag: + ud.tag = tag + + if not ud.tag: + ud.tag = self.latest_revision(url, ud, d) if ud.tag == "master": ud.tag = self.latest_revision(url, ud, d) @@ -132,3 +133,5 @@ class Git(Fetch): output = runfetchcmd("git ls-remote %s://%s%s" % (ud.proto, ud.host, ud.path), d, True) return output.split()[0] + def _build_revision(self, url, ud, d): + return ud.tag -- cgit v1.2.3-54-g00ecf