Hi,
On Thu, Nov 21, 2019 at 05:19:04PM +0100, Christian Göttsche wrote:
> Control: severity -1 important
> Control: tags -1 patch
> 
> Hi,
> 
> what about the following patch:

The existence of the signature in the pristine-tar branch needs to be
checked beforehand instead of trying, failing and then retrying without
it (also on/off/auto need to be handled). See the preparation that went
into 0.9.17 for that.
Cheers,
 -- Guido

> 
> --- /usr/lib/python3/dist-packages/gbp/deb/git.py       2019-10-31
> 16:07:04.000000000 +0100
> +++ /root/git.py        2019-11-21 17:07:41.485223303 +0100
> @@ -320,7 +320,15 @@
>          output = source.upstream_tarball_name(comp.type, component=component)
>          try:
>              self.pristine_tar.checkout(source.name,
> source.upstream_version, comp.type, output_dir,
> -                                       component=component, quiet=True)
> +                                       component=component,
> quiet=True, signature=True)
> +        except CommandExecFailed:
> +            gbp.log.info("Failed to create '%s' with attached
> signature file. Retrying without..." % output)
> +
> +            try:
> +                self.pristine_tar.checkout(source.name,
> source.upstream_version, comp.type, output_dir,
> +                                           component=component, quiet=True)
> +            except Exception as e:
> +                raise GitRepositoryError("Error creating %s: %s" % (output, 
> e))
>          except Exception as e:
>              raise GitRepositoryError("Error creating %s: %s" % (output, e))
>          return True
> 

Reply via email to