diff options
| -rw-r--r-- | bitbake-dev/lib/bb/fetch/__init__.py | 8 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index b58177461b..2191c284e3 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py | |||
| @@ -351,9 +351,11 @@ class FetchData(object): | |||
| 351 | # if user sets localpath for file, use it instead. | 351 | # if user sets localpath for file, use it instead. |
| 352 | self.localpath = self.parm["localpath"] | 352 | self.localpath = self.parm["localpath"] |
| 353 | else: | 353 | else: |
| 354 | bb.fetch.srcrev_internal_call = True | 354 | try: |
| 355 | self.localpath = self.method.localpath(self.url, self, d) | 355 | bb.fetch.srcrev_internal_call = True |
| 356 | bb.fetch.srcrev_internal_call = False | 356 | self.localpath = self.method.localpath(self.url, self, d) |
| 357 | finally: | ||
| 358 | bb.fetch.srcrev_internal_call = False | ||
| 357 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. | 359 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. |
| 358 | # Horrible... | 360 | # Horrible... |
| 359 | bb.data.delVar("ISHOULDNEVEREXIST", d) | 361 | bb.data.delVar("ISHOULDNEVEREXIST", d) |
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) |
