diff options
author | Guido Günther <agx@sigxcpu.org> | 2020-06-30 10:33:31 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2020-06-30 10:39:36 +0200 |
commit | 305a4ad00ee50e63a8c6dab5c79600bd17a66548 (patch) | |
tree | a42a5c42d6769f880d14565bfc348e8bb4189389 | |
parent | 4f2569d8431236d16f753d79ee3389b2e6155e76 (diff) |
import_orig: Drop all upstream signatures with --upstream-signatures=off
This makes sure we don't use spurious files as signatures
-rw-r--r-- | gbp/pkg/upstreamsource.py | 4 | ||||
-rw-r--r-- | gbp/scripts/import_orig.py | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gbp/pkg/upstreamsource.py b/gbp/pkg/upstreamsource.py index 384513e5..2d9ca245 100644 --- a/gbp/pkg/upstreamsource.py +++ b/gbp/pkg/upstreamsource.py @@ -104,6 +104,10 @@ class UpstreamSource(object): def signaturefile(self): return self._sig + @signaturefile.setter + def signaturefile(self, sig): + self._sig = sig + def unpack(self, dir, filters=None): """ Unpack packed upstream sources into a given directory diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index ad0141e6..3a0d2d97 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -519,6 +519,8 @@ def main(argv): # Enforce signature file exists with --upstream-signatures=on if options.upstream_signatures.is_on() and not source.signaturefile: raise GbpError("%s does not have a signature file" % source.path) + elif options.upstream_signatures.is_off(): + source.signaturefile = None # For all practical purposes we're interested in pristine_orig's path if pristine_orig != sources[0].path: sources[0]._path = pristine_orig |