I'm trying to write a custom package provider which depends on a specific rubygems being present, if I try to confine my provider to the "rubygems" feature, I get this error:

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

If I remove that "confine" then things explode since `rubygems` the package isn't installed.

I tried making Package['rubygems'] a requirement of pulling my package in, e.g.

   class {
     "jenkins":
        require => Package['rubygems'];
   }

But, because I'm automatically pulling some things in for installing the Jenkins package, I end up with a dependency cycle:


Error: Could not apply complete catalog: Found 1 dependency cycle: (Anchor[apt::key D50582E6 present] => Apt::Key[Add key: D50582E6 from Apt::Source jenkins] => File[jenkins.list] => Exec[apt_update] => Class[Apt::Update] => Anchor[apt::update] => Class[Apt] => Package[rubygems] => Class[Jenkins] => Anchor[jenkins::begin] => Class[Jenkins::Repo] => Anchor[jenkins::repo::begin] => Class[Jenkins::Repo::Debian] => Apt::Source[jenkins] => File[jenkins.list]) Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz


Is there a good reference I could follow, or example of how to make a custom provider depend on Rubygems being installed without anything too hacky?

--
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/5353284F.6060103%40monkeypox.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to