From a55d19f20a301b727874649b2519f9596bc3e084 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 24 Nov 2018 17:17:10 +0100 Subject: pristine-tar: detect signature verification support --- gbp/pkg/pristinetar.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gbp') 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): """ -- cgit v1.2.3