formatting version numbers.
svn path=/trunk/packages/invirt-dev/; revision=2544
def getDscName(package, ref):
"""Return the .dsc file that will be generated for this package."""
v = getVersion(package, ref)
def getDscName(package, ref):
"""Return the .dsc file that will be generated for this package."""
v = getVersion(package, ref)
- return '%s_%s-%s.dsc' % (
+ if v.debian_version:
+ v_str = '%s-%s' % (v.upstream_version,
+ v.debian_version)
+ else:
+ v_str = v.upstream_version
+ return '%s_%s.dsc' % (
- version.upstream_version,
- version.debian_version)
def sanitizeVersion(version):
def sanitizeVersion(version):
This function strips the epoch from the version number and
replaces any tildes with periods."""
This function strips the epoch from the version number and
replaces any tildes with periods."""
- v = '%s-%s' % (version.upstream_version,
- version.debian_version)
+ if v.debian_version:
+ v = '%s-%s' % (version.upstream_version,
+ version.debian_version)
+ else:
+ v = version.upstream_version
return v.replace('~', '.')
return v.replace('~', '.')