# 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
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
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,
"""
return False
- def go(self, url, urldata, d):
+ def download(self, url, urldata, d):
"""
Fetch urls
Assumes localpath was called first
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):
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)
return True
- def go(self, loc, ud, d):
+ def download(self, loc, ud, d):
"""Fetch url"""
if ud.user:
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
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)
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 + "'")
# 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
return osccmd
- def go(self, loc, ud, d):
+ def download(self, loc, ud, d):
"""
Fetch url
"""
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
"""
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):
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)
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
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 + "'")
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):
def checkstatus(self, uri, ud, d):
- return self.go(uri, ud, d, True)
+ return self.download(uri, ud, d, True)