diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-15 19:57:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-15 19:57:32 -0800 |
commit | 3ebeb119b3381f5ad9f3bcf22cec3571ac731fa1 (patch) | |
tree | 9846a775f2db3814822c7e983db1855fd7924a92 | |
parent | 4c87730bd6f35cb969a2b177c7e85beb9e9b6030 (diff) | |
download | chef-3ebeb119b3381f5ad9f3bcf22cec3571ac731fa1.tar.gz |
fix mysql-should-install-mariadb bug
picks the correct highest version off of a list if we have more
than one pkg in the list at this point.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/provider/package/dnf/dnf_helper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/package/dnf/dnf_helper.py b/lib/chef/provider/package/dnf/dnf_helper.py index 19262c2ec8..bd99b3c3b5 100644 --- a/lib/chef/provider/package/dnf/dnf_helper.py +++ b/lib/chef/provider/package/dnf/dnf_helper.py @@ -58,7 +58,8 @@ def query(command): if not pkgs: sys.stdout.write('{} nil nil\n'.format(command['provides'].split().pop(0))) else: - pkg = pkgs.pop(0) + pkgs.sort + pkg = pkgs.pop() sys.stdout.write('{} {}:{}-{} {}\n'.format(pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch)) # the design of this helper is that it should try to be 'brittle' and fail hard and exit in order |