aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2019-10-27 00:07:30 +0200
committerGuido Günther <agx@sigxcpu.org>2019-10-27 18:07:56 +0100
commit4a97a1ccc8364b6cd0f5f119ea7bce2979f237d9 (patch)
treebfe694dd02263367ead36089a3eaf04a5a198532
parent809fcd969f97ede464c76778cc2dc42433d6cbae (diff)
import-dsc: Import signature if present in dsc
-rw-r--r--gbp/scripts/import_dsc.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index aa3308d..d24ffa2 100644
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -488,9 +488,13 @@ def main(argv):
# unpack
dirs['tmp'] = os.path.abspath(tempfile.mkdtemp(dir='..'))
- # FIXME: need to add signatures to DebianUpstreamSource later here
- sources = [DebianUpstreamSource(dsc.tgz)]
- sources += [DebianAdditionalTarball(t[1], t[0]) for t in dsc.additional_tarballs.items()]
+ sigfile = '{}.asc'.format(dsc.tgz)
+ sigfile = sigfile if sigfile in dsc.sigs else None
+ sources = [DebianUpstreamSource(dsc.tgz, sig=sigfile)]
+ for component, tarball in dsc.additional_tarballs.items():
+ sigfile = '{}.asc'.format(tarball)
+ sigfile = sigfile if sigfile in dsc.sigs else None
+ sources.append(DebianAdditionalTarball(tarball, component))
sources[0].unpack(dirs['tmp'], options.filters)
for tarball in sources[1:]:
gbp.log.info("Found component tarball '%s'" % os.path.basename(tarball.path))