Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnf_package guard is not working properly #9201

Open
asvinours opened this issue Jan 2, 2020 · 0 comments
Open

dnf_package guard is not working properly #9201

asvinours opened this issue Jan 2, 2020 · 0 comments

Comments

@asvinours
Copy link

@asvinours asvinours commented Jan 2, 2020

Describe the problem

When using the dnf_package resource and providing a version number, the package gets re-installed at every chef run.

Software Version

15.6.10

Replication Case

package 'auditbeat' do
    version '7.3.1-1'
end

Deploy a package resource on CentOS 8 with a version number

Stacktrace

[2020-01-01T17:57:02-05:00] TRACE: dnf_package[auditbeat] auditbeat 0:7.3.1-1.x86_64 needs updating to 7.3.1-1
[2020-01-01T17:57:02-05:00] TRACE: dnf_package[auditbeat] auditbeat 0:7.3.1-1.x86_64 needs updating to 7.3.1-1

It seems that the compare_version function is not returning the expected result.
https://github.com/chef/chef/blob/v15.6.10/lib/chef/provider/package/dnf.rb#L134

"input version_compare 0:7.3.1-1.x86_64 - 7.3.1-1"
"output version_compare 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.