Bug #1597

managing gems with Package does not allow arguments

Added by Ed Greenberg over 3 years ago. Updated 7 months ago.

Status:Duplicate Start date:09/23/2008
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:package
Target version:-
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 1

Description

When managing a gem with Package, one cannot set arguments. For instance one cannot do:

gem install mysql — —with-mysql-config=/usr/bin/mysql_config

One cannot add —no-rdoc and —no-ri, nor can one add —source in order to get a gem from github.

I realize I can install gems using Exec, but that is just installing them, not managing them.

If there is agreement, perhaps this could find itself into a future release.

gem_install_source_hack.diff (1.7 kB) James Turnbull, 05/08/2009 11:05 pm

gem_install_source_hack.diff (1.7 kB) Erik Hetzner, 05/08/2009 11:06 pm


Related issues

duplicates Puppet - Feature #915: Add 'options' support to type/provider relationship Duplicate

History

Updated by James Turnbull over 3 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Puppet Community
  • Target version set to 4

Updated by James Turnbull almost 3 years ago

Testing.

Updated by Erik Hetzner almost 3 years ago

test

Updated by Erik Hetzner almost 3 years ago

The attached patch hacks the source parameter to allow passing arguments to a gem install. If the source paramater is not a URI, it is appened as a whole to the gem install command. Example:

  package {
    "mysql" :
      provider => "gem",
      source   => "mysql -- --with-mysql-dir=/opt/mysql-5.1.24-rc-solaris10-sparc",
      ensure   => "2.7" ;
  }

This should not affect any working, existing puppet configs, as it is only additional functionality.

Updated by James Turnbull over 2 years ago

  • Assignee deleted (Puppet Community)

Updated by Ben Lavender almost 2 years ago

  • Affected Puppet version changed from 0.24.4 to 0.25.4

I am having trouble related to this with 0.25.4. In particular, booting up our EC2 nodes, we can shave 10 minutes off a boot time by adding —no-rdoc and —no-ri with a hacked copy of the gem provider distributed as a custom one.

It looks like you were working towards some more features here than just —no-rdoc and —no-ri, but I think that these two should perhaps be the default anyway. Would you merge any of the following if I wrote them up with specs?

  1. A fix to the gem provider that adds —no-rdoc and —no-ri to all installations
  2. A fix to the gem provider that does all of the above-described fun with —source
  3. Some other design that’s been decided on somewhere

Updated by James Turnbull 10 months ago

  • Status changed from Accepted to Duplicate

Duplicates #915.

Updated by James Turnbull 7 months ago

  • Target version deleted (4)

Also available in: Atom PDF