aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/deb/git.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-08-27 14:35:31 +0200
committerGuido Günther <agx@sigxcpu.org>2019-10-27 11:34:43 +0100
commitff9ff7e2b54785acc733da2ca78d0da15bb5d681 (patch)
treee5e361b463db0bf29fdd9b0bb10283e549a146be /gbp/deb/git.py
parent62485247b61090f8bd41a8bf419872db36fa12dc (diff)
Use UpstreamSource for additional tarballs as well
This will help on upstream tarball signatures as well as improving additional tarball handling.
Diffstat (limited to 'gbp/deb/git.py')
-rw-r--r--gbp/deb/git.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/gbp/deb/git.py b/gbp/deb/git.py
index 12ad34d2..5f9003c4 100644
--- a/gbp/deb/git.py
+++ b/gbp/deb/git.py
@@ -282,28 +282,28 @@ class DebianGitRepository(PkgGitRepository):
"""
return True if self.has_branch(self.pristine_tar_branch) else False
- def create_pristine_tar_commits(self, upstream_tree, tarball, component_tarballs):
+ def create_pristine_tar_commits(self, upstream_tree, sources):
"""
Create pristine-tar commits for a package with main tarball
and (optional) component tarballs based on upstream_tree
- @param tarball: path to main tarball
- @param component_tarballs: C{list} of C{tuple}s of component
- name and path to additional tarball
@param upstream_tree: the treeish in the git repo to create the commits against
+ @param soures: C{list} of tarball as I{UpstreamSource}. First one being the main
+ tarball the other ones additional tarballs.
"""
- components = [c for (c, t) in component_tarballs]
+ components = [t.component for t in sources[1:]]
main_tree = self.tree_drop_dirs(upstream_tree, components)
try:
- for component, name in component_tarballs:
- subtree = self.tree_get_dir(upstream_tree, component)
+ for source in sources[1:]:
+ subtree = self.tree_get_dir(upstream_tree, source.component)
if not subtree:
raise GitRepositoryError("No tree for '%s' found in '%s' to create "
- "pristine tar commit from" % (component, upstream_tree))
- gbp.log.debug("Creating pristine tar commit '%s' from '%s'" % (component, subtree))
- self.pristine_tar.commit(name, subtree, quiet=True)
- self.pristine_tar.commit(tarball, main_tree, quiet=True)
+ "pristine tar commit from" % (source.component,
+ upstream_tree))
+ gbp.log.debug("Creating pristine tar commit '%s' from '%s'" % (source.path, subtree))
+ self.pristine_tar.commit(source.path, subtree, quiet=True)
+ self.pristine_tar.commit(sources[0].path, main_tree, quiet=True)
except CommandExecFailed as e:
raise GitRepositoryError(str(e))