On Wed 2015-03-18 04:04:49 -0400, Guido Günther wrote: > Thanks for the patch. This matches a particular pattern, I wonder if > it wouldn't be better to introduce a configurable transformation > function to mangle the version like: > > ----- > > cat <<EOF >~/.gbp.conf > version_mangle = lambda x: x.replace('.', '-') > EOF > > ... > > DebianGitRepository.version_to_tag("libfoo-%(mangled_version)s", "1.8.1") > > ... > > return format_msg(format, > dict(version=DebianGitRepository._sanitize_version(version), > > mangled_version=version_mangle(DebianGitRepository._sanitize_version(version)))
This last line is missing a close-paren, but i get the idea :) > This would allow for arbitrary replacements/transformations. There > have been several requests for version mangling over time so this > might solve all at once. I can understand the appeal of your proposal, it does seem more flexible, though a bit more cognitively costly for the user, who now has to know what kind of code to write for version_mangle. my only concern is that this change appears to make gbp.conf turing-complete, which is maybe a risk we don't want to take? or maybe gbp.conf is already capable of running arbitrary code, and i just don't know how to do it. Anyway, either mechanism would work for my purposes (and indeed, for enigmail specifically, i might not have to worry about it in the future, because i think upstream has just agreed to use simpler tagging conventions). Regards, --dkg -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org