summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch
diff options
context:
space:
mode:
authorRichard Purdie <richard@ted.(none)>2009-09-22 19:50:22 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-24 18:57:08 +0100
commit81386036806d623dc32fab04adb8ba50b2b0c3e6 (patch)
tree070e15b3e31734243bedbe68281d39d65965c0c3 /bitbake/lib/bb/fetch
parent1bc5ed054ebddb8202ba1493a628b373a5de457a (diff)
downloadpoky-81386036806d623dc32fab04adb8ba50b2b0c3e6.tar.gz
bitbake/fetch: Ensure SRCREVINACTION always resets the core flags even when parsing failes by using a try/finally
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index d7b9463b4e..a7fc1af0c9 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -357,9 +357,11 @@ class FetchData(object):
357 # if user sets localpath for file, use it instead. 357 # if user sets localpath for file, use it instead.
358 self.localpath = self.parm["localpath"] 358 self.localpath = self.parm["localpath"]
359 else: 359 else:
360 bb.fetch.srcrev_internal_call = True 360 try:
361 self.localpath = self.method.localpath(self.url, self, d) 361 bb.fetch.srcrev_internal_call = True
362 bb.fetch.srcrev_internal_call = False 362 self.localpath = self.method.localpath(self.url, self, d)
363 finally:
364 bb.fetch.srcrev_internal_call = False
363 # We have to clear data's internal caches since the cached value of SRCREV is now wrong. 365 # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
364 # Horrible... 366 # Horrible...
365 bb.data.delVar("ISHOULDNEVEREXIST", d) 367 bb.data.delVar("ISHOULDNEVEREXIST", d)