diff options
author | Tim Smith <tsmith@chef.io> | 2017-12-21 12:25:29 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-12-21 12:25:29 -0800 |
commit | b07bb9003130d5d920ebb00f22bd3d5036976c9d (patch) | |
tree | cfe1a09412f20cba85e1bb3c8167189cd4eec81a | |
parent | 37bacbbc9d6ca124af631acf72109a992b255e6a (diff) | |
download | chef-b07bb9003130d5d920ebb00f22bd3d5036976c9d.tar.gz |
Don't check both platform_family / os in provides when platform_family will do
We're already going specific enough here to identify the platform_family. Debian is always going to be on Linux and SmartOS on Solaris2. Don't both checking both.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/provider/apt_preference.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/apt_repository.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/apt_update.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/smartos.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/provider/apt_preference.rb b/lib/chef/provider/apt_preference.rb index ff4ea02ff0..59c6fc7f6d 100644 --- a/lib/chef/provider/apt_preference.rb +++ b/lib/chef/provider/apt_preference.rb @@ -24,7 +24,7 @@ require "chef/log" class Chef class Provider class AptPreference < Chef::Provider - provides :apt_preference, os: "linux", platform_family: "debian" + provides :apt_preference, platform_family: "debian" APT_PREFERENCE_DIR = "/etc/apt/preferences.d".freeze diff --git a/lib/chef/provider/apt_repository.rb b/lib/chef/provider/apt_repository.rb index 2d86a6fce4..c16f1e5767 100644 --- a/lib/chef/provider/apt_repository.rb +++ b/lib/chef/provider/apt_repository.rb @@ -27,7 +27,7 @@ class Chef class AptRepository < Chef::Provider include Chef::Mixin::ShellOut - provides :apt_repository, os: "linux", platform_family: "debian" + provides :apt_repository, platform_family: "debian" LIST_APT_KEYS = "apt-key list".freeze LIST_APT_KEY_FINGERPRINTS = "apt-key adv --list-public-keys --with-fingerprint --with-colons".freeze diff --git a/lib/chef/provider/apt_update.rb b/lib/chef/provider/apt_update.rb index bfd9603e4e..9d794abcf0 100644 --- a/lib/chef/provider/apt_update.rb +++ b/lib/chef/provider/apt_update.rb @@ -23,7 +23,7 @@ require "chef/dsl/declare_resource" class Chef class Provider class AptUpdate < Chef::Provider - provides :apt_update, os: "linux", platform_family: "debian" + provides :apt_update, platform_family: "debian" APT_CONF_DIR = "/etc/apt/apt.conf.d" STAMP_DIR = "/var/lib/apt/periodic" diff --git a/lib/chef/provider/package/smartos.rb b/lib/chef/provider/package/smartos.rb index 8e4368f7c1..c23f08b618 100644 --- a/lib/chef/provider/package/smartos.rb +++ b/lib/chef/provider/package/smartos.rb @@ -30,7 +30,7 @@ class Chef attr_accessor :is_virtual_package provides :package, platform: "smartos" - provides :smartos_package, os: "solaris2", platform_family: "smartos" + provides :smartos_package, platform_family: "smartos" def load_current_resource Chef::Log.debug("#{new_resource} loading current resource") |