From ad904b89f001bf3c6b4548916b5e27399b9d6a5d Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 24 Nov 2018 19:22:14 +0100 Subject: PristienTar: Properly detect signature feature --- gbp/pkg/pristinetar.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gbp') diff --git a/gbp/pkg/pristinetar.py b/gbp/pkg/pristinetar.py index 76f1d3c8..3cadf482 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_in_output(self, feature): + def _has_in_output(self, match): """ Check if pristine_tar has a certain feature enabled. @@ -42,7 +42,7 @@ class PristineTar(Command): @rtype: C{bool} """ self.call(['--help'], quiet=True) # There's no --help so we always exit 1 - r = re.compile('.* pristine-tar .* %s' % feature) + r = re.compile(match) for line in self.stderr.splitlines(): if r.match(line): return True @@ -50,11 +50,11 @@ class PristineTar(Command): def has_feature_verify(self): """Does this pristine-tar support tarball verification""" - return self._has_in_output("verify") + return self._has_in_output(".* pristine-tar .* verify") def has_feature_sig(self): """Does this pristine-tar support detached upstream signatures""" - return self._has_in_output(r'\[-s signaturefile\]') + return self._has_in_output(r'.*--signature-file') def has_commit(self, archive_regexp): """ -- cgit v1.2.3