Bug 952955 - Get an error "invalid option: --include-dependencies" when installing any gem using puppet
Summary: Get an error "invalid option: --include-dependencies" when installing any gem...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: puppet
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sam Kottler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 952960 973702 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-17 04:29 UTC by Krishna Raman
Modified: 2014-06-18 08:14 UTC (History)
12 users (show)

Fixed In Version: puppet-3.1.1-4.fc19
Clone Of:
Environment:
Last Closed: 2013-06-29 18:19:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch from upstream issue #19663 (4.14 KB, patch)
2013-05-02 16:55 UTC, Matthaus Owens
no flags Details | Diff

Description Krishna Raman 2013-04-17 04:29:27 UTC
Description of problem:
Get an error "invalid option: --include-dependencies" when installing any gem using puppet. This is because ruby 2.0 installs dependencies by default and has removed this option.

Version-Release number of selected component (if applicable):
puppet-3.1.1-3.fc19

How reproducible:
Always

Steps to Reproduce:
1. Install a puppet manifest with a gem package
  
Actual results:

Error: /Stage[main]/Openshift_origin::Console/Package[formtastic]/ensure: change from absent to 1.2.4 failed: Could not update: Execution of '/usr/bin/gem install -v 1.2.4 --include-dependencies --no-rdoc --no-ri formtastic' returned 1: ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --include-dependencies


Expected results:
Gem is installed

Additional info:

Comment 1 Krishna Raman 2013-04-17 21:50:09 UTC
*** Bug 952960 has been marked as a duplicate of this bug. ***

Comment 2 Krishna Raman 2013-04-17 21:54:44 UTC
This should fix the issue for Ruby 2.0 based setups

*** provider/package/gem.rb.orig	2013-04-17 14:52:11.940699057 -0700
--- provider/package/gem.rb	2013-04-17 14:52:17.823938170 -0700
***************
*** 70,81 ****
    end
  
    def install(useversion = true)
      command = [command(:gemcmd), "install"]
      command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion
-     # Always include dependencies
-     command << "--include-dependencies"
  
      if source = resource[:source]
        begin
          uri = URI.parse(source)
        rescue => detail
--- 70,79 ----

Comment 3 Matthaus Owens 2013-05-02 16:55:25 UTC
Created attachment 742808 [details]
Patch from upstream issue #19663

Comment 4 Matthaus Owens 2013-05-02 16:56:36 UTC
There is an upstream bug on this at: http://projects.puppetlabs.com/issues/19663

It is fixed for Puppet 3.2.0, which is currently in rc.

I've attached a patch from the commit for the upstream bug. It looks exactly like Krishna's patch except it includes tests.

Comment 5 Krishna Raman 2013-05-21 19:00:07 UTC
Is it possible to temporarily patch the RPM while waiting for 3.2.0?

Comment 6 Matthaus Owens 2013-05-22 20:56:54 UTC
3.2.1 shipped today :)

Comment 7 Hiro Asari 2013-06-12 14:35:15 UTC
*** Bug 973702 has been marked as a duplicate of this bug. ***

Comment 8 Krishna Raman 2013-06-13 11:00:28 UTC
@Matthaus Please let me know when you have a package to test.

Comment 9 Jan Pazdziora (Red Hat) 2013-06-14 08:01:32 UTC
Jeroen, any chance of getting puppet 3.2 to Fedora 19? Looking at

   http://koji.fedoraproject.org/koji/packageinfo?packageID=3529

the latest build is still 3.1.1.

Thank you,

Jan

Comment 10 Sam Kottler 2013-06-21 17:16:41 UTC
I'm working on getting this change included and a new 3.1.1 package produced. I'm not sure about bumping the version yet, but there has been some talk about it.

Comment 11 Fedora Update System 2013-06-21 18:40:39 UTC
puppet-3.1.1-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/puppet-3.1.1-4.fc19

Comment 12 Fedora Update System 2013-06-22 01:14:36 UTC
Package puppet-3.1.1-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing puppet-3.1.1-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11462/puppet-3.1.1-4.fc19
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2013-06-29 18:19:58 UTC
puppet-3.1.1-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.