else:
revision = ""
- date = data.getVar("CVSDATE", d, 1) or data.getVar("DATE", d, 1)
+ date = Fetch.getSRCDate(d)
- return os.path.join(data.getVar("DL_DIR", d, 1),data.expand('%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, revision, date), d))
+ return os.path.join(data.getVar("DL_DIR", d, 1),data.expand('%s_%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, path.replace('/', '.'), revision, date), d))
localpath = staticmethod(localpath)
def go(self, d, urls = []):
else:
revision = ""
- date = data.getVar("CVSDATE", d, 1) or data.getVar("DATE", d, 1)
-
- if "method" in parm:
- method = parm["method"]
- else:
- method = "pserver"
+ date = Fetch.getSRCDate(d)
if "proto" in parm:
proto = parm["proto"]
else:
proto = "svn"
- svn_rsh = None
- if method == "ext":
- if "rsh" in parm:
- svn_rsh = parm["rsh"]
-
- tarfn = data.expand('%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, revision, date), localdata)
+ tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata)
data.setVar('TARFILES', dlfile, localdata)
data.setVar('TARFN', tarfn, localdata)
bb.debug(1, "%s already exists, skipping svn checkout." % tarfn)
continue
- svn_tarball_stash = data.getVar('CVS_TARBALL_STASH', d, 1)
- if svn_tarball_stash:
- fetchcmd = data.getVar("FETCHCOMMAND_wget", d, 1)
- uri = svn_tarball_stash + tarfn
- bb.note("fetch " + uri)
- fetchcmd = fetchcmd.replace("${URI}", uri)
- ret = os.system(fetchcmd)
- if ret == 0:
- bb.note("Fetched %s from tarball stash, skipping checkout" % tarfn)
- continue
+ # try to use the tarball stash
+ if Fetch.try_mirror(d, tarfn):
+ continue
olddir = os.path.abspath(os.getcwd())
os.chdir(data.expand(dldir, localdata))
-# setup svnroot
-# svnroot = ":" + method + ":" + user
-# if pswd:
-# svnroot += ":" + pswd
svnroot = host + path
data.setVar('SVNROOT', svnroot, localdata)