Hi Guido,

On Tue, 09 Aug 2022 at 10:54:54 +0200, Guido Günther wrote:
> 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.

That'd work for me, thanks!  Some ideas to cover other use-cases if
desired:

 - Always strip ‘+ds(\.\d*)?’ and ‘+dfsg(\.\d*)?’ repack suffixes
   *after* version mangling.  After all, if upstream uses such suffixes
   in its tags or version number, then the revision has to be mangled so
   it doesn't collide with a repack suffix no?
 - New option --upstream-vcs-tag-strip='\+ds(\.\d*)?$'
 - AFAIK substitution in tag formats currently support a single
   character; it could be changed so the remaining of the middle portion
   is stripped, so ‘%(version%.+ds%_)’ rewrites ‘1.2.3+ds’ to ‘1_2_3’
   and ‘%(version%.+ds%.)’ rewrite it to ‘1.2.3’.  Odd semantics though
   and not trivial to document…

cheers
-- 
Guilhem.

Attachment: signature.asc
Description: PGP signature

Reply via email to