|
My package-provider is very simple – it derives from the stock gem-provider and overwrites gemcmd to use the gem-executable installed with RedHat's rh-ruby22 package for RHEL/CentOS-6 (where the default Ruby is 1.8.7):
require 'puppet/provider/package'
|
|
Puppet::Type.type(:package).provide File.basename(__FILE__, ".rb"),
|
:parent => :gem, :source => :gem do
|
desc "Ruby Gem support using gem from the #{@name}-package"
|
|
has_feature :versionable, :install_options
|
|
commands :gemcmd => "/opt/rh/rh-#{@name.to_s}/root/usr/bin/gem"
|
end
|
Until I added the has_feature-line, my attempts to specify customized install_options were quietly ignored. The descendant provider should've inherited the features of the parent.
On a separate note, when a provider that does not have the install_options-flag set, is used with the install_options-attribute in a manifest, an error (or a warning) should be generated. Quietly ignoring the flags in the manifest is a separate bug.
|