Reputation: 231
Version 0.6.0 of gem2rpm includes all (development and runtime) dependencies for a given Gem.
Example: Rack Gem (http://rubygems.org/gems/rack) Version 1.1.0 has no runtime dependencies, but six development dependencies.
Console output of gem2rpm --dependencies rack-1.0.1.gem
is:
How can I specify to only include runtime dependencies?
I have also opened a ticket on rubyforge.org, but there isn't a lot of activity on that tracker.
Thank you for any hints.
Upvotes: 2
Views: 840
Reputation: 2073
This bug was fixed about 4 months later here : https://github.com/lutter/gem2rpm/commit/10e8f80da8fa5dfcdd5e5800f72106f0b995a6e5 so updating to a newer version of gem2rpm will address this.
Upvotes: 1
Reputation: 231
Sender: Miguel Armas
I also suffered from this bug. I corrected it including only dependencies of type :runtime with the following patch:
--
--- gem2rpm.rb.orig 2010-04-08 00:09:39.794856454 +0100
+++ gem2rpm.rb 2010-04-08 00:27:11.808853058 +0100
@@ -105,10 +105,12 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}-n)
Requires: rubygems
<% for d in spec.dependencies %>
+<% if d.type == :runtime %>
<% for req in d.version_requirements.to_rpm %>
Requires: rubygem(<%= d.name %>) <%= req %>
<% end %>
<% end %>
+<% end %>
BuildRequires: rubygems
<% if spec.extensions.empty? %>
BuildArch: noarch
--
I didn't include the :development dependencies as BuildRequires because they are not needed to create the RPM from the SRPM
Upvotes: 4