summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wang <junbill.wang@samsung.com>2016-05-10 14:07:07 +0000
committerGerrit Code Review <root@liupp-HP-Compaq-Pro-6380-MT>2016-05-10 14:07:07 +0000
commit622de749078200309a485ba287d3b698882f14a9 (patch)
treecc5bce6d7336dd6dab6aa29f34d7cce44cb31acb
parentf8507197185efce41747a49bd029a8185b2e9292 (diff)
parentf709f11844fea7cec177ee01e2536d0d97edeee0 (diff)
downloadgit-buildpackage-622de749078200309a485ba287d3b698882f14a9.tar.gz
git-buildpackage-622de749078200309a485ba287d3b698882f14a9.tar.bz2
git-buildpackage-622de749078200309a485ba287d3b698882f14a9.zip
Merge "Remove unused functions" into devel
-rw-r--r--gbp/rpm/__init__.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index d47fb302..d5fa1ee8 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -901,34 +901,4 @@ def string_to_int(val_str):
else:
return int(val_str)
-def compose_version_str(evr):
- """
- Compose a full version string from individual "version components",
- i.e. epoch, version and release
-
- @param evr: dict of version components
- @type evr: C{dict} of C{str}
- @return: full version
- @rtype: C{str}
-
- >>> compose_version_str({'epoch': '', 'upstreamversion': '1.0'})
- '1.0'
- >>> compose_version_str({'epoch': '2', 'upstreamversion': '1.0', 'release': None})
- '2:1.0'
- >>> compose_version_str({'epoch': None, 'upstreamversion': '1', 'release': '0'})
- '1-0'
- >>> compose_version_str({'epoch': '2', 'upstreamversion': '1.0', 'release': '2.3'})
- '2:1.0-2.3'
- >>> compose_version_str({'epoch': '2', 'upstreamversion': '', 'release': '2.3'})
- """
- if 'upstreamversion' in evr and evr['upstreamversion']:
- version = ""
- if 'epoch' in evr and evr['epoch']:
- version += "%s:" % evr['epoch']
- version += evr['upstreamversion']
- if 'release' in evr and evr['release']:
- version += "-%s" % evr['release']
- if version:
- return version
- return None
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: