"""Sanitize a Debian package version for use as a git tag.
This function strips the epoch from the version number and
- replaces any tildes with periods."""
- if v.debian_version:
+ replaces any tildes with underscores."""
+ if version.debian_version:
v = '%s-%s' % (version.upstream_version,
version.debian_version)
else:
v = version.upstream_version
- return v.replace('~', '.')
+ return v.replace('~', '_')
def aptCopy(package, commit, dst_pocket, src_pocket):
principal))
c.captureOutput(
- ['git', 'tag', '-m', tag_msg, commit],
+ ['git', 'tag', '-m', tag_msg, '--', sanitizeVersion(version),
+ commit],
env=env,
cwd=b.getRepo(package))