bitbake/fetch2: Rename Fetch class to FetchMethod
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
74b71864fe
commit
ab0dd13974
|
@ -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"
|
||||
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
#
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue