aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-11-24 17:17:10 +0100
committerGuido Günther <agx@sigxcpu.org>2018-11-24 17:17:10 +0100
commita55d19f20a301b727874649b2519f9596bc3e084 (patch)
tree2f419462b1fb1f5cf365c92f39bad6f758fbc68e
parent90f0c8c8db6f16e2586c2739091b85031e395ce5 (diff)
pristine-tar: detect signature verification support
-rw-r--r--gbp/pkg/pristinetar.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gbp/pkg/pristinetar.py b/gbp/pkg/pristinetar.py
index be301326..40d7dd30 100644
--- a/gbp/pkg/pristinetar.py
+++ b/gbp/pkg/pristinetar.py
@@ -32,7 +32,7 @@ class PristineTar(Command):
cwd=repo.path,
capture_stderr=True)
- def _has_feature(self, feature):
+ def _has_in_output(self, feature):
"""
Check if pristine_tar has a certain feature enabled.
@@ -49,7 +49,12 @@ class PristineTar(Command):
return False
def has_feature_verify(self):
- return self._has_feature("verify")
+ """Does this pristine-tar support tarball verification"""
+ return self._has_in_output("verify")
+
+ def has_feature_sig(self):
+ """Does this pristine-tar support detached upstream signatures"""
+ return self._has_in_output(r'\[-s signaturefile\]')
def has_commit(self, archive_regexp):
"""