mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
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:
parent
5244de2fae
commit
4b855a85ee
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user