]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch: Ensure SRCREVINACTION always resets the core flags even when parsing...
authorRichard Purdie <richard@ted.(none)>
Tue, 22 Sep 2009 18:50:22 +0000 (19:50 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 24 Sep 2009 17:57:08 +0000 (18:57 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake-dev/lib/bb/fetch/__init__.py
bitbake/lib/bb/fetch/__init__.py

index b58177461b72ae73a6041a03068d9963d706c2bd..2191c284e3d23a1cc2ecfa588e92ae29271a9f2e 100644 (file)
@@ -351,9 +351,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)
index d7b9463b4e3a53ec283d30d7c1baa419c5feb197..a7fc1af0c98de3bc6263ee381fb772374106d5db 100644 (file)
@@ -357,9 +357,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)