mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 2 additions and 7 deletions
|
@ -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]
|
||||
|
||||
|
@ -257,11 +256,7 @@ def _repoquery(repoquery_args,
|
|||
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()
|
||||
return call['stdout'].splitlines()
|
||||
|
||||
|
||||
def _get_repo_options(**kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue