diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2009-10-17 19:48:34 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2009-11-06 15:10:31 +0000 |
commit | 6baea3d6bf0aeef627b70401eb44d9538f63e6d6 (patch) | |
tree | 12f238c914de80757c7f7b38bed4f151a5d40ed5 | |
parent | ed2c32880ae471063dcdf1b353fcc7a8a9931646 (diff) | |
download | bitbake-6baea3d6bf0aeef627b70401eb44d9538f63e6d6.tar.gz |
fetch/__init__.py: Fix a bug where errors could corrupt bitbake internal state wrt SRCREVINACTION (from Poky)
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
-rw-r--r-- | lib/bb/fetch/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index 16c3a961a..7bacb2ceb 100644 --- a/lib/bb/fetch/__init__.py +++ b/lib/bb/fetch/__init__.py @@ -333,9 +333,11 @@ class FetchData(object): # if user sets localpath for file, use it instead. self.localpath = self.parm["localpath"] else: - bb.fetch.srcrev_internal_call = True - self.localpath = self.method.localpath(self.url, self, d) - bb.fetch.srcrev_internal_call = False + try: + bb.fetch.srcrev_internal_call = True + self.localpath = self.method.localpath(self.url, self, d) + finally: + bb.fetch.srcrev_internal_call = False # We have to clear data's internal caches since the cached value of SRCREV is now wrong. # Horrible... bb.data.delVar("ISHOULDNEVEREXIST", d) |