More efficient way to add the epoch before version number

This commit is contained in:
Erik Johnson 2016-02-08 21:08:51 -06:00
parent ed7462793c
commit e5dfcc0ef2

View file

@ -30,6 +30,7 @@ ARCHES_SH = ('sh3', 'sh4', 'sh4a')
ARCHES = ARCHES_64 + ARCHES_32 + ARCHES_PPC + ARCHES_S390 + \
ARCHES_ALPHA + ARCHES_ARM + ARCHES_SH
# EPOCHNUM can't be used until RHEL5 is EOL as it is not present
QUERYFORMAT = '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-%{REPOID}'
@ -84,6 +85,6 @@ def parse_pkginfo(line, osarch=None):
if release:
version += '-{0}'.format(release)
if epoch not in ('(none)', '0'):
version = '{0}:{1}'.format(epoch, version)
version = ':'.join((epoch, version))
return pkginfo(name, version, arch, repoid)