]> code.ossystems Code Review - openembedded-core.git/commitdiff
bb.fetch2: rename "go" with "download" to better reflect its functionality
authorYu Ke <ke.yu@intel.com>
Tue, 18 Jan 2011 15:03:53 +0000 (23:03 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Jan 2011 12:25:47 +0000 (12:25 +0000)
no functional change

Signed-off-by: Yu Ke <ke.yu@intel.com>
13 files changed:
bitbake/lib/bb/fetch2/__init__.py
bitbake/lib/bb/fetch2/bzr.py
bitbake/lib/bb/fetch2/cvs.py
bitbake/lib/bb/fetch2/git.py
bitbake/lib/bb/fetch2/hg.py
bitbake/lib/bb/fetch2/local.py
bitbake/lib/bb/fetch2/osc.py
bitbake/lib/bb/fetch2/perforce.py
bitbake/lib/bb/fetch2/repo.py
bitbake/lib/bb/fetch2/ssh.py
bitbake/lib/bb/fetch2/svk.py
bitbake/lib/bb/fetch2/svn.py
bitbake/lib/bb/fetch2/wget.py

index d19f0e738e3ead8e520e1daaf4558b089b8d97bb..9df91001d5a24214f9200d80783c7fa905e2eaa4 100644 (file)
@@ -263,7 +263,7 @@ def subprocess_setup():
     # SIGPIPE errors are known issues with gzip/bash
     signal.signal(signal.SIGPIPE, signal.SIG_DFL)
 
-def go(d, urls = None):
+def download(d, urls = None):
     """
     Fetch all urls
     init must have previously been called
@@ -293,7 +293,7 @@ def go(d, urls = None):
         if m.forcefetch(u, ud, d) or not localpath:
             # Next try fetching from the original uri, u
             try:
-                m.go(u, ud, d)
+                m.download(u, ud, d)
                 localpath = ud.localpath
             except FetchError:
                 # Remove any incomplete file
@@ -499,7 +499,7 @@ def try_mirrors(d, uri, mirrors, check = False, force = False):
                     if found:
                         return found
                 else:
-                    ud.method.go(newuri, ud, ld)
+                    ud.method.download(newuri, ud, ld)
                     return ud.localpath
             except (bb.fetch2.MissingParameterError,
                     bb.fetch2.FetchError,
@@ -626,7 +626,7 @@ class Fetch(object):
         """
         return False
 
-    def go(self, url, urldata, d):
+    def download(self, url, urldata, d):
         """
         Fetch urls
         Assumes localpath was called first
index 97b042b2a581c43860da608abc9a1dda4e681307..608ecc7474cc887321cbc029d05bcbafb8d60594 100644 (file)
@@ -79,7 +79,7 @@ class Bzr(Fetch):
 
         return bzrcmd
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch url"""
 
         if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK):
index 1570cab9c3b4d1ebd186a5372b502c9259f6e350..8e720904884ec5953e6e70db20a23fc9da69caa7 100644 (file)
@@ -72,7 +72,7 @@ class Cvs(Fetch):
             return True
         return False
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
 
         method = ud.parm.get('method', 'pserver')
         localdir = ud.parm.get('localdir', ud.module)
index c62145770f51cb1f99546b9797a974a710a11add..c962acb1062cf175967ee447e987ef8a6fdb450f 100644 (file)
@@ -106,7 +106,7 @@ class Git(Fetch):
 
         return True
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch url"""
 
         if ud.user:
@@ -242,7 +242,7 @@ class Git(Fetch):
 
         if not os.path.exists(ud.clonedir):
             print("no repo")
-            self.go(None, ud, d)
+            self.download(None, ud, d)
             if not os.path.exists(ud.clonedir):
                 logger.error("GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value", url, ud.clonedir)
                 return None
@@ -250,7 +250,7 @@ class Git(Fetch):
 
         os.chdir(ud.clonedir)
         if not self._contains_ref(rev, d):
-            self.go(None, ud, d)
+            self.download(None, ud, d)
 
         output = runfetchcmd("%s rev-list %s -- 2> /dev/null | wc -l" % (ud.basecmd, rev), d, quiet=True)
         os.chdir(cwd)
index 0ba84330a566abb22b9d82c04f9f7741ea80b83d..635ecbfadec26b3e6614cf8645a692866bb5bcae 100644 (file)
@@ -112,7 +112,7 @@ class Hg(Fetch):
 
         return cmd
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch url"""
 
         logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
index bcb30dfc95b91e2fc05a38dac0d7c4a584d0ebcf..89fbdf6ef1c36fd400eeabef4a9078ccb8254f12 100644 (file)
@@ -56,7 +56,7 @@ class Local(Fetch):
         # We don't set localfile as for this fetcher the file is already local!
         return newpath
 
-    def go(self, url, urldata, d):
+    def download(self, url, urldata, d):
         """Fetch urls (no-op for Local method)"""
         # no need to fetch local files, we'll deal with them in place.
         return 1
index 06ac5a9ce374da558ccb3a5abd315ecf1a7f1ebe..619e2f15ddd3b0618a87ac5a62d8e6c55b352a11 100644 (file)
@@ -79,7 +79,7 @@ class Osc(Fetch):
 
         return osccmd
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """
         Fetch url
         """
index 18b27812e002d9209005a22904a9588743d0cce6..bda0bb8096e4a147f5f89cf35a5cd17ff0ebf35e 100644 (file)
@@ -121,7 +121,7 @@ class Perforce(Fetch):
 
         return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile)
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """
         Fetch urls
         """
index 3330957ce342a8c3d3471e16f4dfe458401a8585..510ba4686a8b413445ac2118dd28718feb021c0c 100644 (file)
@@ -55,7 +55,7 @@ class Repo(Fetch):
 
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch url"""
 
         if os.access(os.path.join(data.getVar("DL_DIR", d, True), ud.localfile), os.R_OK):
index 8b283222bf403f88c52b2246dbbcfaf47c9e7538..78f55a6e9ffa6fb7be2ce03044242166dc5827f4 100644 (file)
@@ -74,7 +74,7 @@ class SSH(Fetch):
         lpath = os.path.join(data.getVar('DL_DIR', d, True), host, os.path.basename(path))
         return lpath
 
-    def go(self, url, urldata, d):
+    def download(self, url, urldata, d):
         dldir = data.getVar('DL_DIR', d, 1)
 
         m = __pattern__.match(url)
index 7990ff21fa947298cf6d20a2172127036b24cf12..3bb4c38c7756d43e6e936d0a1f1e8dcb2206e242 100644 (file)
@@ -57,7 +57,7 @@ class Svk(Fetch):
     def forcefetch(self, url, ud, d):
         return ud.date == "now"
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch urls"""
 
         svkroot = ud.host + ud.path
index 1116795e874dcaf31f9e81ba13a456a3f3856d9f..547c04fd9e5b87a04bf1abb90ad5f7f73d9164ff 100644 (file)
@@ -128,7 +128,7 @@ class Svn(Fetch):
 
         return svncmd
 
-    def go(self, loc, ud, d):
+    def download(self, loc, ud, d):
         """Fetch url"""
 
         logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
index cf36ccad0aac08379db7df52b926404656be9ac6..91cfafb5b56db1fbc6b44f89a1950acc790cbc93 100644 (file)
@@ -48,7 +48,7 @@ class Wget(Fetch):
 
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
 
-    def go(self, uri, ud, d, checkonly = False):
+    def download(self, uri, ud, d, checkonly = False):
         """Fetch urls"""
 
         def fetch_uri(uri, ud, d):
@@ -90,4 +90,4 @@ class Wget(Fetch):
 
 
     def checkstatus(self, uri, ud, d):
-        return self.go(uri, ud, d, True)
+        return self.download(uri, ud, d, True)