Don't handle epoch specially for dnf

Epoch handling is done in salt.utils.pkg.rpm.parse_pkginfo() now, so
remove special handling for dnf and make both yum and dnf work the same.
This commit is contained in:
Erik Johnson 2016-02-08 21:09:43 -06:00
parent 5244de2fae
commit 4b855a85ee

View File

@ -238,8 +238,7 @@ def _repoquery(repoquery_args,
'''
_check_repoquery()
if _yum() == 'dnf':
cmd = ['dnf', 'repoquery', '--quiet', '--queryformat',
query_format.replace('-%{VERSION}_', '-%{EPOCH}:%{VERSION}_')]
cmd = ['dnf', 'repoquery', '--quiet', '--queryformat', query_format]
else:
cmd = ['repoquery', '--plugins', '--queryformat', query_format]
@ -256,10 +255,6 @@ def _repoquery(repoquery_args,
if 'stdout' in call:
comment += call['stdout']
raise CommandExecutionError(comment)
else:
if _yum() == 'dnf':
# Remove the epoch when it is zero to maintain backward compatibility
return call['stdout'].replace('_|-0:', '_|-').splitlines()
else:
return call['stdout'].splitlines()