import_orig: 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/common/import_orig.py

index d31bab976ba67bf184d379f5c7e4e4bb516144f5..96edacf051e2aa0f7ae5617940dfc60c21e3c5c1 100644 (file)
@@ -176,4 +176,9 @@ def download_orig(url):
             os.unlink(target)
         raise GbpError("Failed to download %s: %s" % (url, e))
 
-    return DebianUpstreamSource(target)
+    sig = '{}.asc'.format(target)
+    if os.path.exists(sig):
+        gbp.log.debug("Signature {} found for {}".format(target, sig))
+    else:
+        sig = None
+    return DebianUpstreamSource(target, signaturefile=sig)