@@ -24,7 +24,6 @@ import tempfile
from bb.fetch2.git import Git
from bb.fetch2 import runfetchcmd
from bb.fetch2 import logger
-from bb.fetch2 import Fetch
class GitSM(Git):
def supports(self, ud, d):
@@ -141,9 +140,9 @@ class GitSM(Git):
urls.append(url)
- return Fetch(urls, d, cache=False) if urls else None
+ return urls
- def call_process_submodules(self, ud, d):
+ def implicit_urls(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
# Unpack even when ud.clonedir is not available,
@@ -157,27 +156,6 @@ class GitSM(Git):
else:
raise bb.fetch2.FetchError("Submodule source not available.")
- def need_update(self, ud, d):
- if Git.need_update(self, ud, d):
- return True
-
- need_update = False
- fetch = self.call_process_submodules(ud, d)
- if fetch:
- for url in fetch.urls:
- urldata = fetch.ud[url]
- if urldata.method.need_update(urldata, d):
- need_update = True
-
- return need_update
-
- def download(self, ud, d):
- Git.download(self, ud, d)
-
- fetch = self.call_process_submodules(ud, d)
- if fetch:
- fetch.download()
-
def unpack(self, ud, destdir, d):
fulldestdir = self.destdir(ud, destdir, d)
@@ -204,25 +182,11 @@ class GitSM(Git):
logger.error("Unable to set git config core.bare to false for %s" % fulldestdir)
raise
- fetch = self.process_submodules(ud, fulldestdir, d)
- if fetch:
- fetch.unpack(destdir)
-
- if not ud.bareclone and fetch:
+ def postunpack(self, ud, destdir, d):
+ fulldestdir = self.destdir(ud, destdir, d)
+ if not ud.bareclone:
cmdprefix = ""
# Avoid LFS smudging (replacing the LFS pointers with the actual content) when LFS shouldn't be used but git-lfs is installed.
if not self._need_lfs(ud):
cmdprefix = "GIT_LFS_SKIP_SMUDGE=1 "
runfetchcmd("%s%s submodule update --recursive --no-fetch" % (cmdprefix, ud.basecmd), d, quiet=True, workdir=fulldestdir)
- def clean(self, ud, d):
- fetch = self.call_process_submodules(ud, d)
- if fetch:
- fetch.clean()
- Git.clean(self, ud, d)
-
- def implicit_urldata(self, ud, d):
- fetch = self.call_process_submodules(ud, d)
- if fetch:
- return fetch.expanded_urldata()
-
- return []