summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package.rb
diff options
context:
space:
mode:
authorTom Duffield <tom@chef.io>2017-02-08 09:17:38 -0600
committerTom Duffield <tom@chef.io>2017-02-08 09:17:38 -0600
commit88de5e1dfbfa07da1f666a5ec0ba5c39a96a4122 (patch)
treeadd3f635ef5f54bc7b9eacf439a6909a7d7e0ae8 /lib/chef/provider/package.rb
parentc0350147ecf2a8dd2c7fd2e3c1279ee4a920ec18 (diff)
downloadchef-88de5e1dfbfa07da1f666a5ec0ba5c39a96a4122.tar.gz
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 <tom@chef.io>
Diffstat (limited to 'lib/chef/provider/package.rb')
-rw-r--r--lib/chef/provider/package.rb4
1 files changed, 4 insertions, 0 deletions
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)