From 99c81a1ae3ea5894d9c78caae30edda455ebce4f Mon Sep 17 00:00:00 2001 From: Yu Ke Date: Mon, 27 Dec 2010 09:31:38 +0800 Subject: Fetcher: break the "SRCREVINACTION" deadlock Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}=@bb.fetch.get_srcrev(): get_srcrev()->setup_localpath()->srcrev_internal_helper() ->evaluate SRCREV->get_srcrev() current fetcher resolve the deadlock by introducing a "SRCREVINACTION" condition check. Althoguh it works, it is indeed not clean. This patch use antoehr idea to break the deadlock: break the dependency among SRCREV and get_srcrev(), i.e. assign a specific keyword "AUTOINC" to AUTOREV. when Fetcher meet this keyword, it will check and set the latest revision to urldata.revision. get_srcrev later can use the urldata.revision for value evaluation(SRCPV etc). In this case, SRCREV no longer depends on get_srcrev, and there is not deadlock anymore. (From Poky rev: 1589a1172f9432aed1cc9ce006f68cddf3073774) Signed-off-by: Yu Ke Signed-off-by: Richard Purdie --- lib/bb/fetch2/git.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/bb/fetch2/git.py') diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 58ed1f410..c62145770 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -62,13 +62,7 @@ class Git(Fetch): ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" def localpath(self, url, ud, d): - - tag = Fetch.srcrev_internal_helper(ud, d) - if tag is True: - ud.tag = self.latest_revision(url, ud, d) - elif tag: - ud.tag = tag - + ud.tag = ud.revision if not ud.tag or ud.tag == "master": ud.tag = self.latest_revision(url, ud, d) -- cgit 1.2.3-korg