summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2010-12-27 09:31:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 20:24:33 +0000
commit1589a1172f9432aed1cc9ce006f68cddf3073774 (patch)
tree48616149e847a09c87668f6342b64dce15f4f57f /bitbake/lib/bb/fetch2/hg.py
parent550c3bd82115b4bdb8235da53cfc18b1dc39ad96 (diff)
downloadpoky-1589a1172f9432aed1cc9ce006f68cddf3073774.tar.gz
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. Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/hg.py')
-rw-r--r--bitbake/lib/bb/fetch2/hg.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 80a155108c..0ba84330a5 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -64,14 +64,8 @@ class Hg(Fetch):
64 def localpath(self, url, ud, d): 64 def localpath(self, url, ud, d):
65 if 'rev' in ud.parm: 65 if 'rev' in ud.parm:
66 ud.revision = ud.parm['rev'] 66 ud.revision = ud.parm['rev']
67 else: 67 elif not ud.revision:
68 tag = Fetch.srcrev_internal_helper(ud, d) 68 ud.revision = self.latest_revision(url, ud, d)
69 if tag is True:
70 ud.revision = self.latest_revision(url, ud, d)
71 elif tag:
72 ud.revision = tag
73 else:
74 ud.revision = self.latest_revision(url, ud, d)
75 69
76 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) 70 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
77 71