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 | |
| 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>
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 22 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/bzr.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/cvs.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 8 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/hg.py | 10 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/local.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/osc.py | 8 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/perforce.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/repo.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/ssh.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/svk.py | 8 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/svn.py | 10 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 2 |
13 files changed, 44 insertions, 44 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) |
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py index afaf799900..3d23b4d3cf 100644 --- a/bitbake/lib/bb/fetch2/bzr.py +++ b/bitbake/lib/bb/fetch2/bzr.py | |||
| @@ -28,7 +28,7 @@ import sys | |||
| 28 | import logging | 28 | import logging |
| 29 | import bb | 29 | import bb |
| 30 | from bb import data | 30 | from bb import data |
| 31 | from bb.fetch import Fetch, FetchError, runfetchcmd, logger | 31 | from bb.fetch2 import Fetch, FetchError, runfetchcmd, logger |
| 32 | 32 | ||
| 33 | class Bzr(Fetch): | 33 | class Bzr(Fetch): |
| 34 | def supports(self, url, ud, d): | 34 | def supports(self, url, ud, d): |
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py index 0edb794b04..1570cab9c3 100644 --- a/bitbake/lib/bb/fetch2/cvs.py +++ b/bitbake/lib/bb/fetch2/cvs.py | |||
| @@ -30,7 +30,7 @@ import os | |||
| 30 | import logging | 30 | import logging |
| 31 | import bb | 31 | import bb |
| 32 | from bb import data | 32 | from bb import data |
| 33 | from bb.fetch import Fetch, FetchError, MissingParameterError, logger | 33 | from bb.fetch2 import Fetch, FetchError, MissingParameterError, logger |
| 34 | 34 | ||
| 35 | class Cvs(Fetch): | 35 | class Cvs(Fetch): |
| 36 | """ | 36 | """ |
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index de415ec309..e8ad3b43ca 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
| @@ -23,9 +23,9 @@ BitBake 'Fetch' git implementation | |||
| 23 | import os | 23 | import os |
| 24 | import bb | 24 | import bb |
| 25 | from bb import data | 25 | from bb import data |
| 26 | from bb.fetch import Fetch | 26 | from bb.fetch2 import Fetch |
| 27 | from bb.fetch import runfetchcmd | 27 | from bb.fetch2 import runfetchcmd |
| 28 | from bb.fetch import logger | 28 | from bb.fetch2 import logger |
| 29 | 29 | ||
| 30 | class Git(Fetch): | 30 | class Git(Fetch): |
| 31 | """Class to fetch a module or modules from git repositories""" | 31 | """Class to fetch a module or modules from git repositories""" |
| @@ -225,7 +225,7 @@ class Git(Fetch): | |||
| 225 | cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch) | 225 | cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch) |
| 226 | output = runfetchcmd(cmd, d, True) | 226 | output = runfetchcmd(cmd, d, True) |
| 227 | if not output: | 227 | if not output: |
| 228 | raise bb.fetch.FetchError("Fetch command %s gave empty output\n" % (cmd)) | 228 | raise bb.fetch2.FetchError("Fetch command %s gave empty output\n" % (cmd)) |
| 229 | return output.split()[0] | 229 | return output.split()[0] |
| 230 | 230 | ||
| 231 | def _build_revision(self, url, ud, d): | 231 | def _build_revision(self, url, ud, d): |
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index 3c649a6ad0..9e91bec186 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/lib/bb/fetch2/hg.py | |||
| @@ -29,11 +29,11 @@ import sys | |||
| 29 | import logging | 29 | import logging |
| 30 | import bb | 30 | import bb |
| 31 | from bb import data | 31 | from bb import data |
| 32 | from bb.fetch import Fetch | 32 | from bb.fetch2 import Fetch |
| 33 | from bb.fetch import FetchError | 33 | from bb.fetch2 import FetchError |
| 34 | from bb.fetch import MissingParameterError | 34 | from bb.fetch2 import MissingParameterError |
| 35 | from bb.fetch import runfetchcmd | 35 | from bb.fetch2 import runfetchcmd |
| 36 | from bb.fetch import logger | 36 | from bb.fetch2 import logger |
| 37 | 37 | ||
| 38 | class Hg(Fetch): | 38 | class Hg(Fetch): |
| 39 | """Class to fetch from mercurial repositories""" | 39 | """Class to fetch from mercurial repositories""" |
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py index 6aa9e45768..bcb30dfc95 100644 --- a/bitbake/lib/bb/fetch2/local.py +++ b/bitbake/lib/bb/fetch2/local.py | |||
| @@ -29,7 +29,7 @@ import os | |||
| 29 | import bb | 29 | import bb |
| 30 | import bb.utils | 30 | import bb.utils |
| 31 | from bb import data | 31 | from bb import data |
| 32 | from bb.fetch import Fetch | 32 | from bb.fetch2 import Fetch |
| 33 | 33 | ||
| 34 | class Local(Fetch): | 34 | class Local(Fetch): |
| 35 | def supports(self, url, urldata, d): | 35 | def supports(self, url, urldata, d): |
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py index 26820967a3..06ac5a9ce3 100644 --- a/bitbake/lib/bb/fetch2/osc.py +++ b/bitbake/lib/bb/fetch2/osc.py | |||
| @@ -11,10 +11,10 @@ import sys | |||
| 11 | import logging | 11 | import logging |
| 12 | import bb | 12 | import bb |
| 13 | from bb import data | 13 | from bb import data |
| 14 | from bb.fetch import Fetch | 14 | from bb.fetch2 import Fetch |
| 15 | from bb.fetch import FetchError | 15 | from bb.fetch2 import FetchError |
| 16 | from bb.fetch import MissingParameterError | 16 | from bb.fetch2 import MissingParameterError |
| 17 | from bb.fetch import runfetchcmd | 17 | from bb.fetch2 import runfetchcmd |
| 18 | 18 | ||
| 19 | class Osc(Fetch): | 19 | class Osc(Fetch): |
| 20 | """Class to fetch a module or modules from Opensuse build server | 20 | """Class to fetch a module or modules from Opensuse build server |
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index 222ed7eaaa..18b27812e0 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py | |||
| @@ -30,9 +30,9 @@ import os | |||
| 30 | import logging | 30 | import logging |
| 31 | import bb | 31 | import bb |
| 32 | from bb import data | 32 | from bb import data |
| 33 | from bb.fetch import Fetch | 33 | from bb.fetch2 import Fetch |
| 34 | from bb.fetch import FetchError | 34 | from bb.fetch2 import FetchError |
| 35 | from bb.fetch import logger | 35 | from bb.fetch2 import logger |
| 36 | 36 | ||
| 37 | class Perforce(Fetch): | 37 | class Perforce(Fetch): |
| 38 | def supports(self, url, ud, d): | 38 | def supports(self, url, ud, d): |
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py index 03642e7a0d..3330957ce3 100644 --- a/bitbake/lib/bb/fetch2/repo.py +++ b/bitbake/lib/bb/fetch2/repo.py | |||
| @@ -26,8 +26,8 @@ BitBake "Fetch" repo (git) implementation | |||
| 26 | import os | 26 | import os |
| 27 | import bb | 27 | import bb |
| 28 | from bb import data | 28 | from bb import data |
| 29 | from bb.fetch import Fetch | 29 | from bb.fetch2 import Fetch |
| 30 | from bb.fetch import runfetchcmd | 30 | from bb.fetch2 import runfetchcmd |
| 31 | 31 | ||
| 32 | class Repo(Fetch): | 32 | class Repo(Fetch): |
| 33 | """Class to fetch a module or modules from repo (git) repositories""" | 33 | """Class to fetch a module or modules from repo (git) repositories""" |
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py index 86c76f4e44..8b283222bf 100644 --- a/bitbake/lib/bb/fetch2/ssh.py +++ b/bitbake/lib/bb/fetch2/ssh.py | |||
| @@ -38,8 +38,8 @@ IETF secsh internet draft: | |||
| 38 | 38 | ||
| 39 | import re, os | 39 | import re, os |
| 40 | from bb import data | 40 | from bb import data |
| 41 | from bb.fetch import Fetch | 41 | from bb.fetch2 import Fetch |
| 42 | from bb.fetch import FetchError | 42 | from bb.fetch2 import FetchError |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | __pattern__ = re.compile(r''' | 45 | __pattern__ = re.compile(r''' |
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py index 595a9da255..7990ff21fa 100644 --- a/bitbake/lib/bb/fetch2/svk.py +++ b/bitbake/lib/bb/fetch2/svk.py | |||
| @@ -29,10 +29,10 @@ import os | |||
| 29 | import logging | 29 | import logging |
| 30 | import bb | 30 | import bb |
| 31 | from bb import data | 31 | from bb import data |
| 32 | from bb.fetch import Fetch | 32 | from bb.fetch2 import Fetch |
| 33 | from bb.fetch import FetchError | 33 | from bb.fetch2 import FetchError |
| 34 | from bb.fetch import MissingParameterError | 34 | from bb.fetch2 import MissingParameterError |
| 35 | from bb.fetch import logger | 35 | from bb.fetch2 import logger |
| 36 | 36 | ||
| 37 | class Svk(Fetch): | 37 | class Svk(Fetch): |
| 38 | """Class to fetch a module or modules from svk repositories""" | 38 | """Class to fetch a module or modules from svk repositories""" |
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py index 8f053abf74..3315b159da 100644 --- a/bitbake/lib/bb/fetch2/svn.py +++ b/bitbake/lib/bb/fetch2/svn.py | |||
| @@ -28,11 +28,11 @@ import sys | |||
| 28 | import logging | 28 | import logging |
| 29 | import bb | 29 | import bb |
| 30 | from bb import data | 30 | from bb import data |
| 31 | from bb.fetch import Fetch | 31 | from bb.fetch2 import Fetch |
| 32 | from bb.fetch import FetchError | 32 | from bb.fetch2 import FetchError |
| 33 | from bb.fetch import MissingParameterError | 33 | from bb.fetch2 import MissingParameterError |
| 34 | from bb.fetch import runfetchcmd | 34 | from bb.fetch2 import runfetchcmd |
| 35 | from bb.fetch import logger | 35 | from bb.fetch2 import logger |
| 36 | 36 | ||
| 37 | class Svn(Fetch): | 37 | class Svn(Fetch): |
| 38 | """Class to fetch a module or modules from svn repositories""" | 38 | """Class to fetch a module or modules from svn repositories""" |
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 4d4bdfd493..cf36ccad0a 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
| @@ -30,7 +30,7 @@ import logging | |||
| 30 | import bb | 30 | import bb |
| 31 | import urllib | 31 | import urllib |
| 32 | from bb import data | 32 | from bb import data |
| 33 | from bb.fetch import Fetch, FetchError, encodeurl, decodeurl, logger, runfetchcmd | 33 | from bb.fetch2 import Fetch, FetchError, encodeurl, decodeurl, logger, runfetchcmd |
| 34 | 34 | ||
| 35 | class Wget(Fetch): | 35 | class Wget(Fetch): |
| 36 | """Class to fetch urls via 'wget'""" | 36 | """Class to fetch urls via 'wget'""" |
