summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-18 23:03:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-25 12:25:47 +0000
commite05918937c515dff845fcb4c9e94f8ecbea8c957 (patch)
treec07942361428a8271af45fd53c02a1c3840aa5a8 /bitbake/lib
parent8615b0e282baadf1ac342ec38b7c79e0ac351613 (diff)
downloadpoky-e05918937c515dff845fcb4c9e94f8ecbea8c957.tar.gz
bb.fetch2: rename "go" with "download" to better reflect its functionality
no functional change Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py8
-rw-r--r--bitbake/lib/bb/fetch2/bzr.py2
-rw-r--r--bitbake/lib/bb/fetch2/cvs.py2
-rw-r--r--bitbake/lib/bb/fetch2/git.py6
-rw-r--r--bitbake/lib/bb/fetch2/hg.py2
-rw-r--r--bitbake/lib/bb/fetch2/local.py2
-rw-r--r--bitbake/lib/bb/fetch2/osc.py2
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py2
-rw-r--r--bitbake/lib/bb/fetch2/repo.py2
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py2
-rw-r--r--bitbake/lib/bb/fetch2/svk.py2
-rw-r--r--bitbake/lib/bb/fetch2/svn.py2
-rw-r--r--bitbake/lib/bb/fetch2/wget.py4
13 files changed, 19 insertions, 19 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d19f0e738e..9df91001d5 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -263,7 +263,7 @@ def subprocess_setup():
263 # SIGPIPE errors are known issues with gzip/bash 263 # SIGPIPE errors are known issues with gzip/bash
264 signal.signal(signal.SIGPIPE, signal.SIG_DFL) 264 signal.signal(signal.SIGPIPE, signal.SIG_DFL)
265 265
266def go(d, urls = None): 266def download(d, urls = None):
267 """ 267 """
268 Fetch all urls 268 Fetch all urls
269 init must have previously been called 269 init must have previously been called
@@ -293,7 +293,7 @@ def go(d, urls = None):
293 if m.forcefetch(u, ud, d) or not localpath: 293 if m.forcefetch(u, ud, d) or not localpath:
294 # Next try fetching from the original uri, u 294 # Next try fetching from the original uri, u
295 try: 295 try:
296 m.go(u, ud, d) 296 m.download(u, ud, d)
297 localpath = ud.localpath 297 localpath = ud.localpath
298 except FetchError: 298 except FetchError:
299 # Remove any incomplete file 299 # Remove any incomplete file
@@ -499,7 +499,7 @@ def try_mirrors(d, uri, mirrors, check = False, force = False):
499 if found: 499 if found:
500 return found 500 return found
501 else: 501 else:
502 ud.method.go(newuri, ud, ld) 502 ud.method.download(newuri, ud, ld)
503 return ud.localpath 503 return ud.localpath
504 except (bb.fetch2.MissingParameterError, 504 except (bb.fetch2.MissingParameterError,
505 bb.fetch2.FetchError, 505 bb.fetch2.FetchError,
@@ -626,7 +626,7 @@ class Fetch(object):
626 """ 626 """
627 return False 627 return False
628 628
629 def go(self, url, urldata, d): 629 def download(self, url, urldata, d):
630 """ 630 """
631 Fetch urls 631 Fetch urls
632 Assumes localpath was called first 632 Assumes localpath was called first
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py
index 97b042b2a5..608ecc7474 100644
--- a/bitbake/lib/bb/fetch2/bzr.py
+++ b/bitbake/lib/bb/fetch2/bzr.py
@@ -79,7 +79,7 @@ class Bzr(Fetch):
79 79
80 return bzrcmd 80 return bzrcmd
81 81
82 def go(self, loc, ud, d): 82 def download(self, loc, ud, d):
83 """Fetch url""" 83 """Fetch url"""
84 84
85 if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK): 85 if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK):
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py
index 1570cab9c3..8e72090488 100644
--- a/bitbake/lib/bb/fetch2/cvs.py
+++ b/bitbake/lib/bb/fetch2/cvs.py
@@ -72,7 +72,7 @@ class Cvs(Fetch):
72 return True 72 return True
73 return False 73 return False
74 74
75 def go(self, loc, ud, d): 75 def download(self, loc, ud, d):
76 76
77 method = ud.parm.get('method', 'pserver') 77 method = ud.parm.get('method', 'pserver')
78 localdir = ud.parm.get('localdir', ud.module) 78 localdir = ud.parm.get('localdir', ud.module)
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index c62145770f..c962acb106 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -106,7 +106,7 @@ class Git(Fetch):
106 106
107 return True 107 return True
108 108
109 def go(self, loc, ud, d): 109 def download(self, loc, ud, d):
110 """Fetch url""" 110 """Fetch url"""
111 111
112 if ud.user: 112 if ud.user:
@@ -242,7 +242,7 @@ class Git(Fetch):
242 242
243 if not os.path.exists(ud.clonedir): 243 if not os.path.exists(ud.clonedir):
244 print("no repo") 244 print("no repo")
245 self.go(None, ud, d) 245 self.download(None, ud, d)
246 if not os.path.exists(ud.clonedir): 246 if not os.path.exists(ud.clonedir):
247 logger.error("GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value", url, ud.clonedir) 247 logger.error("GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value", url, ud.clonedir)
248 return None 248 return None
@@ -250,7 +250,7 @@ class Git(Fetch):
250 250
251 os.chdir(ud.clonedir) 251 os.chdir(ud.clonedir)
252 if not self._contains_ref(rev, d): 252 if not self._contains_ref(rev, d):
253 self.go(None, ud, d) 253 self.download(None, ud, d)
254 254
255 output = runfetchcmd("%s rev-list %s -- 2> /dev/null | wc -l" % (ud.basecmd, rev), d, quiet=True) 255 output = runfetchcmd("%s rev-list %s -- 2> /dev/null | wc -l" % (ud.basecmd, rev), d, quiet=True)
256 os.chdir(cwd) 256 os.chdir(cwd)
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 0ba84330a5..635ecbfade 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -112,7 +112,7 @@ class Hg(Fetch):
112 112
113 return cmd 113 return cmd
114 114
115 def go(self, loc, ud, d): 115 def download(self, loc, ud, d):
116 """Fetch url""" 116 """Fetch url"""
117 117
118 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") 118 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index bcb30dfc95..89fbdf6ef1 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -56,7 +56,7 @@ class Local(Fetch):
56 # We don't set localfile as for this fetcher the file is already local! 56 # We don't set localfile as for this fetcher the file is already local!
57 return newpath 57 return newpath
58 58
59 def go(self, url, urldata, d): 59 def download(self, url, urldata, d):
60 """Fetch urls (no-op for Local method)""" 60 """Fetch urls (no-op for Local method)"""
61 # no need to fetch local files, we'll deal with them in place. 61 # no need to fetch local files, we'll deal with them in place.
62 return 1 62 return 1
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index 06ac5a9ce3..619e2f15dd 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -79,7 +79,7 @@ class Osc(Fetch):
79 79
80 return osccmd 80 return osccmd
81 81
82 def go(self, loc, ud, d): 82 def download(self, loc, ud, d):
83 """ 83 """
84 Fetch url 84 Fetch url
85 """ 85 """
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 18b27812e0..bda0bb8096 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -121,7 +121,7 @@ class Perforce(Fetch):
121 121
122 return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile) 122 return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile)
123 123
124 def go(self, loc, ud, d): 124 def download(self, loc, ud, d):
125 """ 125 """
126 Fetch urls 126 Fetch urls
127 """ 127 """
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py
index 3330957ce3..510ba4686a 100644
--- a/bitbake/lib/bb/fetch2/repo.py
+++ b/bitbake/lib/bb/fetch2/repo.py
@@ -55,7 +55,7 @@ class Repo(Fetch):
55 55
56 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) 56 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
57 57
58 def go(self, loc, ud, d): 58 def download(self, loc, ud, d):
59 """Fetch url""" 59 """Fetch url"""
60 60
61 if os.access(os.path.join(data.getVar("DL_DIR", d, True), ud.localfile), os.R_OK): 61 if os.access(os.path.join(data.getVar("DL_DIR", d, True), ud.localfile), os.R_OK):
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index 8b283222bf..78f55a6e9f 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -74,7 +74,7 @@ class SSH(Fetch):
74 lpath = os.path.join(data.getVar('DL_DIR', d, True), host, os.path.basename(path)) 74 lpath = os.path.join(data.getVar('DL_DIR', d, True), host, os.path.basename(path))
75 return lpath 75 return lpath
76 76
77 def go(self, url, urldata, d): 77 def download(self, url, urldata, d):
78 dldir = data.getVar('DL_DIR', d, 1) 78 dldir = data.getVar('DL_DIR', d, 1)
79 79
80 m = __pattern__.match(url) 80 m = __pattern__.match(url)
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py
index 7990ff21fa..3bb4c38c77 100644
--- a/bitbake/lib/bb/fetch2/svk.py
+++ b/bitbake/lib/bb/fetch2/svk.py
@@ -57,7 +57,7 @@ class Svk(Fetch):
57 def forcefetch(self, url, ud, d): 57 def forcefetch(self, url, ud, d):
58 return ud.date == "now" 58 return ud.date == "now"
59 59
60 def go(self, loc, ud, d): 60 def download(self, loc, ud, d):
61 """Fetch urls""" 61 """Fetch urls"""
62 62
63 svkroot = ud.host + ud.path 63 svkroot = ud.host + ud.path
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 1116795e87..547c04fd9e 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -128,7 +128,7 @@ class Svn(Fetch):
128 128
129 return svncmd 129 return svncmd
130 130
131 def go(self, loc, ud, d): 131 def download(self, loc, ud, d):
132 """Fetch url""" 132 """Fetch url"""
133 133
134 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") 134 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index cf36ccad0a..91cfafb5b5 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -48,7 +48,7 @@ class Wget(Fetch):
48 48
49 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) 49 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
50 50
51 def go(self, uri, ud, d, checkonly = False): 51 def download(self, uri, ud, d, checkonly = False):
52 """Fetch urls""" 52 """Fetch urls"""
53 53
54 def fetch_uri(uri, ud, d): 54 def fetch_uri(uri, ud, d):
@@ -90,4 +90,4 @@ class Wget(Fetch):
90 90
91 91
92 def checkstatus(self, uri, ud, d): 92 def checkstatus(self, uri, ud, d):
93 return self.go(uri, ud, d, True) 93 return self.download(uri, ud, d, True)