summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/package/rpm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb
index c053760542..2aa4e01e68 100644
--- a/lib/chef/provider/package/rpm.rb
+++ b/lib/chef/provider/package/rpm.rb
@@ -63,6 +63,7 @@ class Chef
when /([\w\d_.-]+)\s([\w\d_.-]+)/
@current_resource.package_name($1)
@new_resource.version($2)
+ @candidate_version = $2
end
end
end
@@ -77,7 +78,6 @@ class Chef
@rpm_status = popen4("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@current_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
- when /not installed/
when /([\w\d_.-]+)\s([\w\d_.-]+)/
Chef::Log.debug("#{@new_resource} current version is #{$2}")
@current_resource.version($2)