Lines Matching full:ud
25 def supports(self, ud, d): argument
29 return ud.type in ['cvs']
31 def urldata_init(self, ud, d): argument
32 if not "module" in ud.parm:
33 raise MissingParameterError("module", ud.url)
34 ud.module = ud.parm["module"]
36 ud.tag = ud.parm.get('tag', "")
39 if 'date' in ud.parm:
40 ud.date = ud.parm['date']
41 elif ud.tag:
42 ud.date = ""
45 if 'norecurse' in ud.parm:
49 if 'fullpath' in ud.parm:
52 …ud.localfile = d.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, …
56 ud.pkgdir = os.path.join(cvsdir, pkg)
58 def need_update(self, ud, d): argument
59 if (ud.date == "now"):
61 if not os.path.exists(ud.localpath):
65 def download(self, ud, d): argument
67 method = ud.parm.get('method', 'pserver')
68 localdir = ud.parm.get('localdir', ud.module)
69 cvs_port = ud.parm.get('port', '')
73 if "rsh" in ud.parm:
74 cvs_rsh = ud.parm["rsh"]
77 cvsroot = ud.path
86 cvsroot += ":" + ud.user
87 if ud.pswd:
88 cvsroot += ":" + ud.pswd
89 cvsroot += "@" + ud.host + ":" + cvs_port + ud.path
92 if 'norecurse' in ud.parm:
94 if ud.date:
96 if len(ud.date) == 12:
97 … options.append("-D \"%s %s:%s UTC\"" % (ud.date[0:8], ud.date[8:10], ud.date[10:12]))
99 options.append("-D \"%s UTC\"" % ud.date)
100 if ud.tag:
101 options.append("-r %s" % ud.tag)
104 cvscmd = cvsbasecmd + " '-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module
113 moddir = os.path.join(ud.pkgdir, localdir)
116 logger.info("Update " + ud.url)
117 bb.fetch2.check_network_access(d, cvsupdatecmd, ud.url)
122 logger.info("Fetch " + ud.url)
124 bb.utils.mkdirhier(ud.pkgdir)
125 workdir = ud.pkgdir
127 bb.fetch2.check_network_access(d, cvscmd, ud.url)
133 … raise FetchError("Directory %s was not readable despite sucessful fetch?!" % moddir, ud.url)
135 scmdata = ud.parm.get("scmdata", "")
143 if 'fullpath' in ud.parm:
144 workdir = ud.pkgdir
145 cmd = "tar %s -czf %s %s" % (tar_flags, ud.localpath, localdir)
148 cmd = "tar %s -czf %s %s" % (tar_flags, ud.localpath, os.path.basename(moddir))
150 runfetchcmd(cmd, d, cleanup=[ud.localpath], workdir=workdir)
152 def clean(self, ud, d): argument
155 bb.utils.remove(ud.pkgdir, True)
156 bb.utils.remove(ud.localpath)