From 88de5e1dfbfa07da1f666a5ec0ba5c39a96a4122 Mon Sep 17 00:00:00 2001 From: Tom Duffield Date: Wed, 8 Feb 2017 09:17:38 -0600 Subject: Declare package_locked inside the Package provider The Package provider uses this method in its code, but it doesn't enforce it's existence. For sanity we should at least raise an error to ensure all the providers that support locking/unlocking a package have the method to determine whether the package is locked. Signed-off-by: Tom Duffield --- lib/chef/provider/package.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index f52614672a..6689e8d0c6 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -251,6 +251,10 @@ class Chef end end + def package_locked(name, version) + raise Chef::Exceptions::UnsupportedAction, "#{self} has no way to detect if package is locked" + end + # @todo use composition rather than inheritance def multipackage_api_adapter(name, version) -- cgit v1.2.1