summaryrefslogtreecommitdiff
path: root/gbp/scripts/common
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-09-12 13:30:36 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:03 +0300
commit4e98ad1247911bd73daca07b3c0410600e5d8bba (patch)
tree5e3db3eb373a660298ac88e319724599bb23aec3 /gbp/scripts/common
parenta4a489cbf79aa80644d07597962016e7c05611be (diff)
downloadgit-buildpackage-4e98ad1247911bd73daca07b3c0410600e5d8bba.tar.gz
git-buildpackage-4e98ad1247911bd73daca07b3c0410600e5d8bba.tar.bz2
git-buildpackage-4e98ad1247911bd73daca07b3c0410600e5d8bba.zip
common/buildpackage: use GitRepository for submodules
Initialize a GitRepository object for each submodule in git_archive_submodules(). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts/common')
-rw-r--r--gbp/scripts/common/buildpackage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/scripts/common/buildpackage.py b/gbp/scripts/common/buildpackage.py
index 41c50ca3..56e4cb0f 100644
--- a/gbp/scripts/common/buildpackage.py
+++ b/gbp/scripts/common/buildpackage.py
@@ -74,10 +74,11 @@ def git_archive_submodules(repo, treeish, output, prefix, comp_type, comp_level,
# generate each submodule's arhive and append it to the main archive
for (subdir, commit) in repo.get_submodules(treeish):
tarpath = [subdir, subdir[2:]][subdir.startswith("./")]
+ subrepo = GitRepository(os.path.join(repo.path, subdir))
gbp.log.debug("Processing submodule %s (%s)" % (subdir, commit[0:8]))
- repo.archive(format=format, prefix='%s%s/' % (prefix, tarpath),
- output=submodule_archive, treeish=commit, cwd=subdir)
+ subrepo.archive(format=format, prefix='%s%s/' % (prefix, tarpath),
+ output=submodule_archive, treeish=commit)
if format == 'tar':
CatenateTarArchive(main_archive)(submodule_archive)
elif format == 'zip':