diff options
author | Lamont Granquist <lamont@opscode.com> | 2020-11-13 16:19:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 16:19:47 -0800 |
commit | 6731b532d20b4371c275610bb0898a3ab90bc85b (patch) | |
tree | de4fbdd8c98b3857e4dac4174dd630104762c5a4 | |
parent | 0b7ab72fa3729c4a880a0c757cc9e46fa0473168 (diff) | |
parent | 40e50956e77b107908e2f0ef203ac2369c8e5ad0 (diff) | |
download | chef-6731b532d20b4371c275610bb0898a3ab90bc85b.tar.gz |
Merge pull request #10648 from chef/lcg/zypper-fix2
Fix zypper_package CI failures
-rw-r--r-- | lib/chef/provider/package/zypper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/provider/package/zypper.rb b/lib/chef/provider/package/zypper.rb index 6ed7339e32..a62f4ac6ee 100644 --- a/lib/chef/provider/package/zypper.rb +++ b/lib/chef/provider/package/zypper.rb @@ -103,6 +103,12 @@ class Chef (status, name, type, version, arch, repo) = [ md[1], md[2], md[3], md[4], md[5], md[6] ] next if version == "Version" # header + # sometimes even though we request a specific version in the search string above and have match exact, we wind up + # with other versions in the ouput, particularly getting the installed version when downgrading. + if new_version + next unless version == new_version || version.start_with?("#{new_version}-") + end + return version end end |