Hi,
On Fri, Apr 08, 2022 at 02:10:28AM +0200, Guilhem Moulin wrote:
> Package: git-buildpackage
> Version: 0.9.25
> Severity: wishlist
> 
> Dear Maintainer,
> 
> `gpg import-orig --upstream-vcs-tag=%(version)s` is great, however the
> substitution doesn't work well will repack suffixes such as +dfsg or
> +ds.  Perhaps ‘%(version)s’ shouldn't unconditionally strip repack
> suffixes, but unfortunately ‘%(version%+ds%)s’ doesn't work either
> 
>       >>> DebianGitRepository.version_to_tag(r'%(version%+ds%)s', "1.2.3+ds")
>       […]
>     gbp.errors.GbpError: Failed to format %(version%+ds%)s: Missing value 
> 'version%+ds%' in {'version': '1.2.3+ds', 'hversion': '1-2-3+ds'}
> 
> AFAIK one can't use d/gbp.conf, instead one needs to manually run `gpg
> import-orig --upstream-vcs-tag=1.2.3 --uscan` which requires to find out
> the most recent upstream version number beforehand.  It would be nice if
> d/gbp.conf had a way to specify a substitution string or template that
> works with repack suffixes.

We could fix the replacement to be empty:

  https://github.com/agx/git-buildpackage/compare/master...ds

This causes trouble for people though that need this *and* to mangle the
version by other means.

Cheers,
 -- Guido



> 
> Thanks for maintaining gbp!
> -- 
> Guilhem.

Reply via email to