summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-12-15 14:34:10 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-15 14:34:10 -0800
commitee049ed97120993d1ef1ff99e697906e7a541eda (patch)
treecb967f520e4fa3e8fee4d65c8770821c4ad7c046
parentd14efdb0be57f59a0e93ba96c7342fd29fc8e656 (diff)
downloadchef-ee049ed97120993d1ef1ff99e697906e7a541eda.tar.gz
add a comment about the Tao of python-vs-ruby
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/package/dnf.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/provider/package/dnf.rb b/lib/chef/provider/package/dnf.rb
index 84594bf4a6..c8ab82acdd 100644
--- a/lib/chef/provider/package/dnf.rb
+++ b/lib/chef/provider/package/dnf.rb
@@ -39,6 +39,15 @@ class Chef
provides :dnf_package, os: "linux"
+ #
+ # Most of the magic in this class happens in the python helper script. The ruby side of this
+ # provider knows only enough to translate Chef-style new_resource name+package+version into
+ # a request to the python side. The python side is then responsible for knowing everything
+ # about RPMs and what is installed and what is available. The ruby side of this class should
+ # remain a lightweight translation layer to translate Chef requests into RPC requests to
+ # python. This class knows nothing about how to compare RPM versions, and does not maintain
+ # any cached state of installed/available versions and should be kept that way.
+ #
def python_helper
@python_helper ||= PythonHelper.instance
end