diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-05-24 06:53:55 +0200 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-05-24 06:53:55 +0200 |
commit | d120858fe431a4d97ee40a7e474de925274ef24c (patch) | |
tree | 158d72a9bdfdcc957797cad6466aa1c5295e2485 | |
parent | f63599a3fe0924c6545587c0a2450fbd9ee4113b (diff) |
strip epoch from upstream version
-rw-r--r-- | gbp/deb_utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gbp/deb_utils.py b/gbp/deb_utils.py index 8c4fd917..f4bc854b 100644 --- a/gbp/deb_utils.py +++ b/gbp/deb_utils.py @@ -18,7 +18,11 @@ def parse_changelog(changelog): return None cp = email.message_from_string(output) if '-' in cp['Version']: - cp['Upstream-Version'], cp['Debian-Version'] = cp['Version'].rsplit('-', 1) + upstream_version, cp['Debian-Version'] = cp['Version'].rsplit('-', 1) + if ':' in upstream_version: + cp['Epoch'], cp['Upstream-Version'] = upstream_version.split(':',1) + else: + cp['Upstream-Version'] = upstream_version else: cp['Debian-Version'] = cp['Version'] return cp |