Lines Matching full:ud
65 def supports(self, ud, d): argument
69 return ud.type in ['s3']
74 def urldata_init(self, ud, d): argument
75 if 'downloadfilename' in ud.parm:
76 ud.basename = ud.parm['downloadfilename']
78 ud.basename = os.path.basename(ud.path)
80 ud.localfile = d.expand(urllib.parse.unquote(ud.basename))
82 ud.basecmd = d.getVar("FETCHCMD_s3") or "/usr/bin/env aws s3"
84 def download(self, ud, d): argument
90 cmd = '%s cp s3://%s%s %s' % (ud.basecmd, ud.host, ud.path, ud.localpath)
91 bb.fetch2.check_network_access(d, cmd, ud.url)
100 if not os.path.exists(ud.localpath):
101 … command returned success for s3://%s%s but %s doesn't exist?!" % (ud.host, ud.path, ud.localpath))
103 if os.path.getsize(ud.localpath) == 0:
104 os.remove(ud.localpath)
105 … resulted in a zero size file?! Deleting and failing since this isn't right." % (ud.host, ud.path))
109 def checkstatus(self, fetch, ud, d): argument
114 cmd = '%s ls s3://%s%s' % (ud.basecmd, ud.host, ud.path)
115 bb.fetch2.check_network_access(d, cmd, ud.url)
122 … raise FetchError("The aws ls command for s3://%s%s gave empty output" % (ud.host, ud.path))