summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-12-05 11:29:45 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-05 11:29:45 -0800
commitb0288e3bb41f5f0aead9d38a98112298eaee5e1c (patch)
tree6aebe6c0ea8dafc445dbeae49ba1ca44edb6b245
parent8b1600d825a7f9509f9448d0b831b8a07c9aec02 (diff)
downloadchef-lcg/fix-yum-regexp.tar.gz
fix yum regexp similarly to rpm regexp in #3985lcg/fix-yum-regexp
this is a "nope, aint got time to test this one" PR. this affects a code path that is only for localinstalls and doesn't have any existing tests. i've already exceeded my 5 minute timebox for fixing the problem. i'm more likely to rewrite the yum provider from scratch and shitcan the unit tests in their entirety than to reuse any work that i do here so any time spent on carefully testing this is likely to end up wasted. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/package/yum.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index 022fdcae09..8b7d7a5083 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -197,7 +197,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}", :timeout => Chef::Config[:yum_timeout]).stdout.each_line do |line|
case line
- when /([\w\d_.-]+)\s([\w\d_.-]+)/
+ when /^(\S+)\s(\S+)$/
@current_resource.package_name($1)
@new_resource.version($2)
end