if not self.method:
raise NoMethodError(url)
+ if hasattr(self.method, "urldata_init"):
+ self.method.urldata_init(self, d)
+
if self.method.supports_srcrev():
self.revisions = {}
for name in self.names:
if len(self.names) == 1:
self.revision = self.revisions[self.names[0]]
- if hasattr(self.method, "urldata_init"):
- self.method.urldata_init(self, d)
+ if hasattr(self.method, "fixuprevisions"):
+ self.method.fixuprevisions(self, d)
if "localpath" in self.parm:
# if user sets localpath for file, use it instead.
ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
+ ud.write_tarballs = (data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0"
+
+ ud.localfile = ud.clonedir
+
+def fixuprevisions(self, ud, d):
for name in ud.names:
# Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
ud.branches[name] = ud.revisions[name]
ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
- ud.write_tarballs = (data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0"
-
- ud.localfile = ud.clonedir
-
def localpath(self, url, ud, d):
return ud.clonedir