diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-08-03 17:54:33 -0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-08-03 17:54:33 -0300 |
commit | 3b99b64630a7c6f165b15905733e007b229d7381 (patch) | |
tree | b64e4f082005cc1f71367c0520a16b8148d9902b /gbp/deb | |
parent | 88e74cfd8cae684ae4b3320f9da30e89497479d2 (diff) |
DebianSource: Split out upstream_tarball_names
to generate names of all upstream tarballs
Diffstat (limited to 'gbp/deb')
-rw-r--r-- | gbp/deb/source.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gbp/deb/source.py b/gbp/deb/source.py index c18602c4..1a0a99e4 100644 --- a/gbp/deb/source.py +++ b/gbp/deb/source.py @@ -117,7 +117,9 @@ class DebianSource(object): def upstream_tarball_name(self, compression, component=None): """ - How an upstream tarball for this source package needs to be named + Possible upstream tarball name for this source package + + Gives the name of the main tarball if component is None """ if self.is_native(): return None @@ -125,3 +127,15 @@ class DebianSource(object): self.upstream_version, compression=compression, component=component) + + def upstream_tarball_names(self, comp_type, components=None): + """ + Possible upstream tarballs names for this source package + + This includes component tarballs names. with the given + component names + """ + names = [self.upstream_tarball_name(comp_type)] + for component in (components or []): + names += [self.upstream_tarball_name(comp_type, c) for c in components] + return names |