diff options
author | Irving Popovetsky <irving@getchef.com> | 2015-06-08 09:48:23 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-06-09 16:06:18 -0700 |
commit | df6d8878da01c87b0a6774a093decc00b53bae69 (patch) | |
tree | 25b6018ae968361aaac88b7cde4d41714ffafe09 /lib/chef/provider | |
parent | ce0c2d7ac2685d4fab78a99bf8fa9838b39a5eb8 (diff) | |
download | chef-df6d8878da01c87b0a6774a093decc00b53bae69.tar.gz |
fix rpm_package when sourced packages have a tilde character in the version
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/package/rpm.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index 21c39752d1..c5d52a8384 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -61,7 +61,7 @@ class Chef Chef::Log.debug("#{@new_resource} checking rpm status") shell_out_with_timeout!("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}").stdout.each_line do |line| case line - when /^([\w\d+_.-]+)\s([\w\d_.-]+)$/ + when /^([\w\d+_.-]+)\s([\w\d~_.-]+)$/ @current_resource.package_name($1) @new_resource.version($2) @candidate_version = $2 @@ -78,7 +78,7 @@ class Chef @rpm_status = shell_out_with_timeout("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@current_resource.package_name}") @rpm_status.stdout.each_line do |line| case line - when /^([\w\d+_.-]+)\s([\w\d_.-]+)$/ + when /^([\w\d+_.-]+)\s([\w\d~_.-]+)$/ Chef::Log.debug("#{@new_resource} current version is #{$2}") @current_resource.version($2) end |