From fa426b73b09d273a8eea3436dcf459c352a31212 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 4 Feb 2011 10:49:27 +0000 Subject: bitbake/fetch2: Rename Fetch class to FetchMethod (From Poky rev: ab0dd1397491478ee6149283e5ba8775dd8cdc3b) Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 8 ++++---- lib/bb/fetch2/bzr.py | 4 ++-- lib/bb/fetch2/cvs.py | 4 ++-- lib/bb/fetch2/git.py | 4 ++-- lib/bb/fetch2/hg.py | 4 ++-- lib/bb/fetch2/local.py | 4 ++-- lib/bb/fetch2/osc.py | 6 +++--- lib/bb/fetch2/perforce.py | 4 ++-- lib/bb/fetch2/repo.py | 4 ++-- lib/bb/fetch2/ssh.py | 4 ++-- lib/bb/fetch2/svk.py | 4 ++-- lib/bb/fetch2/svn.py | 4 ++-- lib/bb/fetch2/wget.py | 4 ++-- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index bdec67776..b60ed0ce6 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -587,7 +587,7 @@ class FetchData(object): self.localpath = None self.lockfile = None (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) - self.date = Fetch.getSRCDate(self, d) + self.date = FetchMethod.getSRCDate(self, d) self.url = url if not self.user and "user" in self.parm: self.user = self.parm["user"] @@ -618,7 +618,7 @@ class FetchData(object): if self.method.supports_srcrev(): self.revisions = {} for name in self.names: - self.revisions[name] = Fetch.srcrev_internal_helper(self, d, name) + self.revisions[name] = FetchMethod.srcrev_internal_helper(self, d, name) # add compatibility code for non name specified case if len(self.names) == 1: @@ -645,7 +645,7 @@ class FetchData(object): self.localpath = self.method.localpath(self.url, self, d) -class Fetch(object): +class FetchMethod(object): """Base class for 'fetch'ing data""" def __init__(self, urls = []): @@ -893,7 +893,7 @@ class Fetch(object): uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False count = None if uselocalcount: - count = Fetch.localcount_internal_helper(ud, d, name) + count = FetchMethod.localcount_internal_helper(ud, d, name) if count is None: count = localcounts[key + '_count'] or "0" diff --git a/lib/bb/fetch2/bzr.py b/lib/bb/fetch2/bzr.py index 22168a835..e69bc4c8e 100644 --- a/lib/bb/fetch2/bzr.py +++ b/lib/bb/fetch2/bzr.py @@ -28,9 +28,9 @@ import sys import logging import bb from bb import data -from bb.fetch2 import Fetch, FetchError, runfetchcmd, logger +from bb.fetch2 import FetchMethod, FetchError, runfetchcmd, logger -class Bzr(Fetch): +class Bzr(FetchMethod): def supports(self, url, ud, d): return ud.type in ['bzr'] diff --git a/lib/bb/fetch2/cvs.py b/lib/bb/fetch2/cvs.py index d792328c2..b440ed7b1 100644 --- a/lib/bb/fetch2/cvs.py +++ b/lib/bb/fetch2/cvs.py @@ -30,9 +30,9 @@ import os import logging import bb from bb import data -from bb.fetch2 import Fetch, FetchError, MissingParameterError, logger +from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger -class Cvs(Fetch): +class Cvs(FetchMethod): """ Class to fetch a module or modules from cvs repositories """ diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 1ae1d4030..38e2c93be 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -23,11 +23,11 @@ BitBake 'Fetch' git implementation import os import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import runfetchcmd from bb.fetch2 import logger -class Git(Fetch): +class Git(FetchMethod): """Class to fetch a module or modules from git repositories""" def init(self, d): # diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py index ffede8cf5..d186b009d 100644 --- a/lib/bb/fetch2/hg.py +++ b/lib/bb/fetch2/hg.py @@ -29,13 +29,13 @@ import sys import logging import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import MissingParameterError from bb.fetch2 import runfetchcmd from bb.fetch2 import logger -class Hg(Fetch): +class Hg(FetchMethod): """Class to fetch from mercurial repositories""" def supports(self, url, ud, d): """ diff --git a/lib/bb/fetch2/local.py b/lib/bb/fetch2/local.py index 56b20e56d..7b840a46d 100644 --- a/lib/bb/fetch2/local.py +++ b/lib/bb/fetch2/local.py @@ -29,9 +29,9 @@ import os import bb import bb.utils from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod -class Local(Fetch): +class Local(FetchMethod): def supports(self, url, urldata, d): """ Check to see if a given url represents a local fetch. diff --git a/lib/bb/fetch2/osc.py b/lib/bb/fetch2/osc.py index 9b97cf1cc..5c3a6fea6 100644 --- a/lib/bb/fetch2/osc.py +++ b/lib/bb/fetch2/osc.py @@ -11,12 +11,12 @@ import sys import logging import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import MissingParameterError from bb.fetch2 import runfetchcmd -class Osc(Fetch): +class Osc(FetchMethod): """Class to fetch a module or modules from Opensuse build server repositories.""" @@ -41,7 +41,7 @@ class Osc(Fetch): ud.revision = ud.parm['rev'] else: pv = data.getVar("PV", d, 0) - rev = Fetch.srcrev_internal_helper(ud, d) + rev = FetchMethod.srcrev_internal_helper(ud, d) if rev and rev != True: ud.revision = rev else: diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py index e98440f59..583dfb93b 100644 --- a/lib/bb/fetch2/perforce.py +++ b/lib/bb/fetch2/perforce.py @@ -30,11 +30,11 @@ import os import logging import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import logger -class Perforce(Fetch): +class Perforce(FetchMethod): def supports(self, url, ud, d): return ud.type in ['p4'] diff --git a/lib/bb/fetch2/repo.py b/lib/bb/fetch2/repo.py index 9d890a5e9..3b16fc014 100644 --- a/lib/bb/fetch2/repo.py +++ b/lib/bb/fetch2/repo.py @@ -26,10 +26,10 @@ BitBake "Fetch" repo (git) implementation import os import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import runfetchcmd -class Repo(Fetch): +class Repo(FetchMethod): """Class to fetch a module or modules from repo (git) repositories""" def supports(self, url, ud, d): """ diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py index 29cc27219..8b07b3a71 100644 --- a/lib/bb/fetch2/ssh.py +++ b/lib/bb/fetch2/ssh.py @@ -38,7 +38,7 @@ IETF secsh internet draft: import re, os from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError @@ -61,7 +61,7 @@ __pattern__ = re.compile(r''' $ ''', re.VERBOSE) -class SSH(Fetch): +class SSH(FetchMethod): '''Class to fetch a module or modules via Secure Shell''' def supports(self, url, urldata, d): diff --git a/lib/bb/fetch2/svk.py b/lib/bb/fetch2/svk.py index 8220bf3dc..213d0d3ec 100644 --- a/lib/bb/fetch2/svk.py +++ b/lib/bb/fetch2/svk.py @@ -29,12 +29,12 @@ import os import logging import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import MissingParameterError from bb.fetch2 import logger -class Svk(Fetch): +class Svk(FetchMethod): """Class to fetch a module or modules from svk repositories""" def supports(self, url, ud, d): """ diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py index 267c9bb7e..ce8628890 100644 --- a/lib/bb/fetch2/svn.py +++ b/lib/bb/fetch2/svn.py @@ -28,13 +28,13 @@ import sys import logging import bb from bb import data -from bb.fetch2 import Fetch +from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import MissingParameterError from bb.fetch2 import runfetchcmd from bb.fetch2 import logger -class Svn(Fetch): +class Svn(FetchMethod): """Class to fetch a module or modules from svn repositories""" def supports(self, url, ud, d): """ diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py index e33265e1c..8e34b0c2b 100644 --- a/lib/bb/fetch2/wget.py +++ b/lib/bb/fetch2/wget.py @@ -30,9 +30,9 @@ import logging import bb import urllib from bb import data -from bb.fetch2 import Fetch, FetchError, encodeurl, decodeurl, logger, runfetchcmd +from bb.fetch2 import FetchMethod, FetchError, encodeurl, decodeurl, logger, runfetchcmd -class Wget(Fetch): +class Wget(FetchMethod): """Class to fetch urls via 'wget'""" def supports(self, url, ud, d): """ -- cgit 1.2.3-korg