From 0b162c45dda4eaee70066b2973dcab9014e9d40f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sun, 17 Sep 2017 10:04:49 -0700 Subject: Open apt resources up to prevent breaking change If we want these to throw a no ops vs. a hard failure we need them to be wide open. Since a lot of people (including all of chef-cookbooks) have coded as if these will gracefully skip this would have been a breaking change. Signed-off-by: Tim Smith --- lib/chef/resource/apt_preference.rb | 2 +- lib/chef/resource/apt_repository.rb | 2 +- lib/chef/resource/apt_update.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chef/resource/apt_preference.rb b/lib/chef/resource/apt_preference.rb index b0f56d983e..603766d76b 100644 --- a/lib/chef/resource/apt_preference.rb +++ b/lib/chef/resource/apt_preference.rb @@ -22,7 +22,7 @@ class Chef class Resource class AptPreference < Chef::Resource resource_name :apt_preference - provides :apt_preference, os: "linux", platform_family: "debian" + provides :apt_preference property :package_name, String, name_property: true, regex: [/^([a-z]|[A-Z]|[0-9]|_|-|\.|\*|\+)+$/] property :glob, String diff --git a/lib/chef/resource/apt_repository.rb b/lib/chef/resource/apt_repository.rb index f16b3088a6..8b69435246 100644 --- a/lib/chef/resource/apt_repository.rb +++ b/lib/chef/resource/apt_repository.rb @@ -22,7 +22,7 @@ class Chef class Resource class AptRepository < Chef::Resource resource_name :apt_repository - provides :apt_repository, os: "linux", platform_family: "debian" + provides :apt_repository property :repo_name, String, name_property: true property :uri, String diff --git a/lib/chef/resource/apt_update.rb b/lib/chef/resource/apt_update.rb index 39ebc8662c..67ca7fbfea 100644 --- a/lib/chef/resource/apt_update.rb +++ b/lib/chef/resource/apt_update.rb @@ -22,7 +22,7 @@ class Chef class Resource class AptUpdate < Chef::Resource resource_name :apt_update - provides :apt_update, os: "linux", platform_family: "debian" + provides :apt_update # allow bare apt_update with no name property :name, String, default: "" -- cgit v1.2.1