summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-18 19:12:46 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-18 19:12:46 -0800
commit6f1cf250101bfce180060c4fdb3daa1637858065 (patch)
tree3fded7d266d604d02bbe3a4b98480c53eb567d38
parented6ff97301ad9aced2ab175128a45ad011bd4716 (diff)
downloadchef-lcg/dpkg-regression.tar.gz
fix dpkg regressionlcg/dpkg-regression
-rw-r--r--lib/chef/provider/package/dpkg.rb1
-rw-r--r--spec/unit/provider/package/dpkg_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/provider/package/dpkg.rb b/lib/chef/provider/package/dpkg.rb
index 3a9cecc660..b13e8d8eb6 100644
--- a/lib/chef/provider/package/dpkg.rb
+++ b/lib/chef/provider/package/dpkg.rb
@@ -66,6 +66,7 @@ class Chef
if pkginfo = DPKG_INFO.match(line)
@current_resource.package_name(pkginfo[1])
@new_resource.version(pkginfo[2])
+ @candidate_version = pkginfo[2]
end
end
end
diff --git a/spec/unit/provider/package/dpkg_spec.rb b/spec/unit/provider/package/dpkg_spec.rb
index 154809f88c..1d24daef95 100644
--- a/spec/unit/provider/package/dpkg_spec.rb
+++ b/spec/unit/provider/package/dpkg_spec.rb
@@ -59,6 +59,7 @@ describe Chef::Provider::Package::Dpkg do
@provider.load_current_resource
expect(@provider.current_resource.package_name).to eq("wget")
expect(@new_resource.version).to eq(version)
+ expect(@provider.candidate_version).to eq(version)
end
it 'if short version provided' do