diff options
| author | Yu Ke <ke.yu@intel.com> | 2011-01-10 18:05:07 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 18:05:07 +0000 |
| commit | c64b445f38179a117d39319f762f9dc2435da0ea (patch) | |
| tree | 11d59fd3179d6c62eb80e81afaf343900d94f082 /bitbake/lib/bb/fetch2/__init__.py | |
| parent | 6b212ad3c3a848be713d62b942da3a294a26f043 (diff) | |
| download | poky-c64b445f38179a117d39319f762f9dc2435da0ea.tar.gz | |
bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetch
bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence.
Fix these referrence with bb.fetch2 referrence
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index f7153ebce9..dd6f714d71 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -134,9 +134,9 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
| 134 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) | 134 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) |
| 135 | if uri_find_decoded.index(i) == 2: | 135 | if uri_find_decoded.index(i) == 2: |
| 136 | if d: | 136 | if d: |
| 137 | localfn = bb.fetch.localpath(uri, d) | 137 | localfn = bb.fetch2.localpath(uri, d) |
| 138 | if localfn: | 138 | if localfn: |
| 139 | result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(bb.fetch.localpath(uri, d))) | 139 | result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(bb.fetch2.localpath(uri, d))) |
| 140 | else: | 140 | else: |
| 141 | return uri | 141 | return uri |
| 142 | return encodeurl(result_decoded) | 142 | return encodeurl(result_decoded) |
| @@ -158,7 +158,7 @@ def fetcher_init(d): | |||
| 158 | elif srcrev_policy == "clear": | 158 | elif srcrev_policy == "clear": |
| 159 | logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) | 159 | logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) |
| 160 | try: | 160 | try: |
| 161 | bb.fetch.saved_headrevs = pd['BB_URI_HEADREVS'].items() | 161 | bb.fetch2.saved_headrevs = pd['BB_URI_HEADREVS'].items() |
| 162 | except: | 162 | except: |
| 163 | pass | 163 | pass |
| 164 | del pd['BB_URI_HEADREVS'] | 164 | del pd['BB_URI_HEADREVS'] |
| @@ -177,7 +177,7 @@ def fetcher_compare_revisions(d): | |||
| 177 | 177 | ||
| 178 | pd = persist_data.persist(d) | 178 | pd = persist_data.persist(d) |
| 179 | data = pd['BB_URI_HEADREVS'].items() | 179 | data = pd['BB_URI_HEADREVS'].items() |
| 180 | data2 = bb.fetch.saved_headrevs | 180 | data2 = bb.fetch2.saved_headrevs |
| 181 | 181 | ||
| 182 | changed = False | 182 | changed = False |
| 183 | for key in data: | 183 | for key in data: |
| @@ -378,7 +378,7 @@ def get_srcrev(d): | |||
| 378 | # | 378 | # |
| 379 | # Neater solutions welcome! | 379 | # Neater solutions welcome! |
| 380 | # | 380 | # |
| 381 | if bb.fetch.srcrev_internal_call: | 381 | if bb.fetch2.srcrev_internal_call: |
| 382 | return "SRCREVINACTION" | 382 | return "SRCREVINACTION" |
| 383 | 383 | ||
| 384 | scms = [] | 384 | scms = [] |
| @@ -494,7 +494,7 @@ def try_mirrors(d, uri, mirrors, check = False, force = False): | |||
| 494 | if newuri != uri: | 494 | if newuri != uri: |
| 495 | try: | 495 | try: |
| 496 | ud = FetchData(newuri, ld) | 496 | ud = FetchData(newuri, ld) |
| 497 | except bb.fetch.NoMethodError: | 497 | except bb.fetch2.NoMethodError: |
| 498 | logger.debug(1, "No method for %s", uri) | 498 | logger.debug(1, "No method for %s", uri) |
| 499 | continue | 499 | continue |
| 500 | 500 | ||
| @@ -508,9 +508,9 @@ def try_mirrors(d, uri, mirrors, check = False, force = False): | |||
| 508 | else: | 508 | else: |
| 509 | ud.method.go(newuri, ud, ld) | 509 | ud.method.go(newuri, ud, ld) |
| 510 | return ud.localpath | 510 | return ud.localpath |
| 511 | except (bb.fetch.MissingParameterError, | 511 | except (bb.fetch2.MissingParameterError, |
| 512 | bb.fetch.FetchError, | 512 | bb.fetch2.FetchError, |
| 513 | bb.fetch.MD5SumError): | 513 | bb.fetch2.MD5SumError): |
| 514 | import sys | 514 | import sys |
| 515 | (type, value, traceback) = sys.exc_info() | 515 | (type, value, traceback) = sys.exc_info() |
| 516 | logger.debug(2, "Mirror fetch failure: %s", value) | 516 | logger.debug(2, "Mirror fetch failure: %s", value) |
| @@ -571,10 +571,10 @@ class FetchData(object): | |||
| 571 | self.localpath = local | 571 | self.localpath = local |
| 572 | if not local: | 572 | if not local: |
| 573 | try: | 573 | try: |
| 574 | bb.fetch.srcrev_internal_call = True | 574 | bb.fetch2.srcrev_internal_call = True |
| 575 | self.localpath = self.method.localpath(self.url, self, d) | 575 | self.localpath = self.method.localpath(self.url, self, d) |
| 576 | finally: | 576 | finally: |
| 577 | bb.fetch.srcrev_internal_call = False | 577 | bb.fetch2.srcrev_internal_call = False |
| 578 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. | 578 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. |
| 579 | # Horrible... | 579 | # Horrible... |
| 580 | bb.data.delVar("ISHOULDNEVEREXIST", d) | 580 | bb.data.delVar("ISHOULDNEVEREXIST", d) |
