GitCommand("submodule", [ "add", repo_path ])()
- def update_submodules(self, init=True, recursive=True):
+ def update_submodules(self, init=True, recursive=True, fetch=False):
"""Update all submodules"""
if not self.has_submodules():
return
args.append("--recursive")
if init:
args.append("--init")
+ if not fetch:
+ args.append("--no-fetch")
+
GitCommand("submodule", args)()
try:
if repo.has_submodules():
+ repo.update_submodules()
git_archive_submodules(repo, treeish, output, prefix,
comp_type, comp_level, comp_opts)
if ret:
raise GbpError, "Error in dump_tree archive pipe"
+ if repo.has_submodules():
+ repo.update_submodules()
for (subdir, commit) in repo.get_submodules(treeish):
gbp.log.info("Processing submodule %s (%s)" % (subdir, commit[0:8]))
tarpath = [subdir, subdir[2:]][subdir.startswith("./")]