def download(self, ud, d): Git.download(self, ud, d) os.chdir(ud.clonedir) submodules = self.uses_submodules(ud, d) if submodules: self.update_submodules(ud, d)
def download(self, ud, d): Git.download(self, ud, d) os.chdir(ud.clonedir) annex = self.uses_annex(ud, d) if annex: self.update_annex(ud, d)
def download(self, ud, d): def download_submodule(ud, url, module, modpath, workdir, d): url += ";bareclone=1;nobranch=1" # Is the following still needed? #url += ";nocheckout=1" try: newfetch = Fetch([url], d, cache=False) newfetch.download() # Drop a nugget to add each of the srcrevs we've fetched (used by need_update) runfetchcmd("%s config --add bitbake.srcrev %s" % \ (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=workdir) except Exception as e: logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e))) raise Git.download(self, ud, d) # If we're using a shallow mirror tarball it needs to be unpacked # temporarily so that we can examine the .gitmodules file if ud.shallow and os.path.exists(ud.fullshallow) and self.need_update( ud, d): tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir) self.process_submodules(ud, tmpdir, download_submodule, d) shutil.rmtree(tmpdir) else: self.process_submodules(ud, ud.clonedir, download_submodule, d)
def download(self, ud, d): Git.download(self, ud, d) if not ud.shallow or ud.localpath != ud.fullshallow: submodules = self.uses_submodules(ud, d, ud.clonedir) if submodules: self.update_submodules(ud, d)
def download(self, ud, d): def download_submodule(ud, url, module, modpath, d): url += ";bareclone=1;nobranch=1" # Is the following still needed? #url += ";nocheckout=1" try: newfetch = Fetch([url], d, cache=False) newfetch.download() except Exception as e: logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e))) raise Git.download(self, ud, d) self.process_submodules(ud, ud.clonedir, download_submodule, d)
def download(self, ud, d): def download_submodule(ud, url, module, modpath, d): url += ";bareclone=1;nobranch=1" # Is the following still needed? #url += ";nocheckout=1" try: newfetch = Fetch([url], d, cache=False) newfetch.download() # Drop a nugget to add each of the srcrevs we've fetched (used by need_update) runfetchcmd("%s config --add bitbake.srcrev %s" % \ (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=ud.clonedir) except Exception as e: logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e))) raise Git.download(self, ud, d) self.process_submodules(ud, ud.clonedir, download_submodule, d)
def download(self, ud, d): Git.download(self, ud, d) if not ud.shallow or ud.localpath != ud.fullshallow: self.update_submodules(ud, d)
def download(self, ud, d): Git.download(self, ud, d) if not ud.shallow or ud.localpath != ud.fullshallow: if self.uses_annex(ud, d, ud.clonedir): self.update_annex(ud, d, ud.clonedir)