diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-11-23 19:59:02 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-12-02 13:41:33 -0800 |
commit | 602e09a72c6617ee01ca3febb519d3fd36bd2b8c (patch) | |
tree | 376938e5ee04b27b41f4e62ff511644455bfd82e /lib/chef/mixin/get_source_from_package.rb | |
parent | de1f684f415faa54599c6b3abbe211d64a319aa6 (diff) | |
download | chef-602e09a72c6617ee01ca3febb519d3fd36bd2b8c.tar.gz |
dpkg multipackage and bonus fixes
- multipackages dpkg_package
- fixes edge conditions in load-current-resource around purging/removing
packages that threw errors before
- fixes the ability to purge packages that have been removed
- adds a lot of functional tests for dpkg_package
Diffstat (limited to 'lib/chef/mixin/get_source_from_package.rb')
-rw-r--r-- | lib/chef/mixin/get_source_from_package.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/mixin/get_source_from_package.rb b/lib/chef/mixin/get_source_from_package.rb index 2ed251854a..cb5583b431 100644 --- a/lib/chef/mixin/get_source_from_package.rb +++ b/lib/chef/mixin/get_source_from_package.rb @@ -1,5 +1,5 @@ # Author:: Lamont Granquist (<lamont@opscode.com>) -# Copyright:: Copyright (c) 2008 Opscode, Inc. +# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,6 +27,12 @@ class Chef module Mixin module GetSourceFromPackage + # FIXME: this is some bad code that I wrote a long time ago. + # - it does too much in the initializer + # - it mutates the new_resource + # - it does not support multipackage arrays + # this code is deprecated, check out the :use_package_names_for_source + # subclass directive instead def initialize(new_resource, run_context) super return if new_resource.package_name.is_a?(Array) @@ -40,4 +46,3 @@ class Chef end end end - |