Changeset 2544 for trunk


Ignore:
Timestamp:
Nov 22, 2009, 4:07:21 PM (15 years ago)
Author:
broder
Message:

Deal with Debian-native packages correctly when calculating and
formatting version numbers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirtibuilder

    r2543 r2544  
    7171    """Return the .dsc file that will be generated for this package."""
    7272    v = getVersion(package, ref)
    73     return '%s_%s-%s.dsc' % (
     73    if v.debian_version:
     74        v_str = '%s-%s' % (v.upstream_version,
     75                           v.debian_version)
     76    else:
     77        v_str = v.upstream_version
     78    return '%s_%s.dsc' % (
    7479        package,
    75         version.upstream_version,
    76         version.debian_version)
     80        v_str)
    7781
    7882
     
    8286    This function strips the epoch from the version number and
    8387    replaces any tildes with periods."""
    84     v = '%s-%s' % (version.upstream_version,
    85                    version.debian_version)
     88    if v.debian_version:
     89        v = '%s-%s' % (version.upstream_version,
     90                       version.debian_version)
     91    else:
     92        v = version.upstream_version
    8693    return v.replace('~', '.')
    8794
Note: See TracChangeset for help on using the changeset viewer.