|
This is a repeat of comments I've made elsewhere....
Reviewing our list of package providers, I identify two types of providers: single-instance and multiple-instance. For the single-instance providers, such as yum, there should be only one executable, and it should be in PATH. For multiple-instance providers, such as gem and pip, there could be n-number of instances, each with its own executable and none of them may be in PATH. We recognize this with our puppet_gem provider, which differs from the gem provider only in that it uses an absolute path for gemcmd (except on Windows).
The provider attribute of a package is, in practice, overloaded as a command attribute: but provider does not accept an absolute path. An optional command attribute for providers (as implemented in the Exec resource type) would support multiple-instance providers without requiring a custom provider type for each provider instance.
Note that implementing the command attribute to support multiple-instance packages via a specific command executable will require adding the command attribute to self.title_patterns in lib/puppet/type/package.rb to maintain uniqueness via a composite uniqueness key. For example: ['sinatra', 'gem', '/usr/bin/gem'].
See also:
https://tickets.puppetlabs.com/browse/PUP-6134
|