On Monday, April 21, 2014 12:25:25 PM UTC-5, R Tyler Croy wrote:
>
>
> On 04/20/2014 11:49, Felix Frank wrote: 
> > On 04/20/2014 03:52 AM, R. Tyler Croy wrote: 
> >> Warning: Puppet.features.rubygems? is deprecated. Require rubygems in 
> >> your application's entry point if you need it. 
> >>     (at /usr/lib/ruby/vendor_ruby/puppet/util/feature.rb:17:in `add') 
> >> Failed to load feature test for rubygems: no such file to load -- 
> >> rubygems 
> > Hi, 
> > 
> > I'm not sure about the whole context, but reading this error gives me 
> > the idea that you're simply supposed to 
> > 
> > require 'rubygems' 
> > 
> > and just let the type/provider's initialization fail if it's not 
> present. 
> > 
>
> Requiring rubygems will fail because it's not installed on the system, 
> that's where the dependency cycle comes into play. I cannot require the 
> Package[rubygems] -> Class[jenkins] safely because the Jenkins module 
> does some futzing about with Apt and apt::source :/ 
>
>

Connect the dots for me.  Why is it necessary for Package['rubygems'] to be 
applied before Class['jenkins']?  For what type are you trying to provide?

If the provider you are writing is for some resource type that 
Class['jenkins'] uses, then your best alternative may be to modify the 
jenkins module to express the relationship on some appropriate class or 
resource within.  Or you could perhaps do that without directly modifying 
the module, for instance with something along these lines:

My_resource_type<| |> {
  require +> [Package['rubygems']]
}


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/7953409d-ac60-4b17-9a7a-24602ee369c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to