find_upstream: Add signature file if found
authorGuido Günther <agx@sigxcpu.org>
Sat, 26 Oct 2019 15:02:00 +0000 (17:02 +0200)
committerGuido Günther <agx@sigxcpu.org>
Sun, 27 Oct 2019 10:34:49 +0000 (11:34 +0100)
gbp/scripts/import_orig.py

index 26eb3c79ef4c129b767fdbeff9d5916ada8c6e1f..0aa4ec79fa38a95c472693a12e258d71e5a2aa07 100644 (file)
@@ -178,7 +178,12 @@ def find_upstream(use_uscan, args, version=None):
     elif len(args) == 0:
         raise GbpError("No archive to import specified. Try --help.")
     else:
-        return DebianUpstreamSource(args[0])
+        sig = '{}.asc'.format(args[0])
+        if os.path.exists(sig):
+            gbp.log.debug("Signature {} found for {}".format(args[0], sig))
+        else:
+            sig = None
+        return DebianUpstreamSource(args[0], sig=sig)
 
 
 def debian_branch_merge(repo, tag, version, options):