Bug 1325022 - rubygem-rdoc should "Requires" (not Recommends) rubygem-json
Summary: rubygem-rdoc should "Requires" (not Recommends) rubygem-json
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2016-04-07 21:35 UTC by Richard W.M. Jones
Modified: 2016-05-25 20:01 UTC (History)
7 users (show)

Fixed In Version: ruby-2.3.1-56.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-25 20:01:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2016-04-07 21:35:14 UTC
Description of problem:

Currently rubygem-rdoc only Recommends rubygem-json.
For some reason Koji (in Rawhide) has stopped installing
Recommends dependencies, and this causes a build failure
for my package:

rake rdoc
Parsing sources...
 33% [ 1/ 3]  README.rdoc
 66% [ 2/ 3]  ext/guestfs/_guestfs.c
100% [ 3/ 3]  lib/guestfs.rb
rake aborted!
LoadError: cannot load such file -- json
/usr/share/gems/gems/rdoc-4.2.1/lib/rdoc/generator/json_index.rb:2:in `<top (required)>'
/usr/share/gems/gems/rdoc-4.2.1/lib/rdoc/generator/darkfish.rb:176:in `initialize'
/usr/share/gems/gems/rdoc-4.2.1/lib/rdoc/rdoc.rb:511:in `new'
/usr/share/gems/gems/rdoc-4.2.1/lib/rdoc/rdoc.rb:511:in `document'
/usr/share/gems/gems/rdoc-4.2.1/lib/rdoc/task.rb:249:in `block in define'
Tasks: TOP => rdoc => doc/site/api/created.rid

It looks as if rdoc requires json, it's not optional.

Version-Release number of selected component (if applicable):

rubygem-rdoc-4.2.1-54.fc24.noarch

How reproducible:

100%

Steps to Reproduce:
1. Install rubygem-rdoc.
2. Remove rubygem-json.
3. Try to build some Ruby documentation.

Actual results:

See above.

Comment 1 Vít Ondruch 2016-04-08 08:28:35 UTC
Hi Richad,

Thank you for the report. Do you have the failed build at hand? Could you provide the link?

I don't remember from top of my head, but I'd say, that there are certain scenarios when RDoc doesn't require JSON (for example using 'ri' for documentation), where there are tasks which requires the JSON, hence it is optional. The idea is, that this dependency should be installed by default, but if you know what is going on, you don't have to install it. If Koji won't install the soft dependencies by default (and I support this), then the packages BR will need to be fixed likely.

Comment 2 Vít Ondruch 2016-04-08 08:35:00 UTC
Ah, now I read the announcement:

https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/message/RXBHZ7774EKWPMV6TDBBONTTJ5XIEUGP/

So we should check your .spec file and either probably fix the BR to include the JSON or find out what else might be the right place to introduce the JSON dependency ...

Comment 3 Richard W.M. Jones 2016-04-08 09:00:46 UTC
Koji doesn't let me find the failed build any longer.

The code is here:

  https://github.com/libguestfs/libguestfs/tree/master/ruby

Specifically the 'rdoc' rule is being from run:

  https://github.com/libguestfs/libguestfs/blob/master/ruby/Rakefile.in

I have added BR: rubygem(json).  However it seems as if generating
Ruby docs in general requires the json module.  Nothing in libguestfs
Ruby code explicitly depends on json.

Comment 4 Mamoru TASAKA 2016-04-08 13:22:05 UTC
Here is your failed task.

http://koji.fedoraproject.org/koji/taskinfo?taskID=13586482

Comment 6 Richard W.M. Jones 2016-05-10 13:40:44 UTC
Same thing affected hivex:
https://bugzilla.redhat.com/show_bug.cgi?id=1334753#c1

Comment 7 Vít Ondruch 2016-05-23 12:13:27 UTC
So I changed back the dependency from Recommends to Requires, but the reason might be a bit different than you have expected.

The rubygem-rdoc might appear in Fedora from two sources, once is the ruby subpackage rubygem-rdoc, but there is also independent package rubygem-rdoc, which is built directly from the gem.

The thing is, that if the package is built from the gem, there is specified hard dependency on json, which is later picked up by RPM dependency generator.

That would mean that in times, when this independent package has more recent version then the ruby subpackage (this is the case now, since I build RDoc package a few moments ago), the dependency would be enforced, but in other days, when the ruby subpackage wins, the dependency would be missing.

So to make the experience consistent, lets keep the hard dependency (although its a shame, I'd prefer to keep this as a soft dependency to allow to reduce the installation footprint when the size matters and developer know what (s)he is doing).

Comment 8 Fedora Update System 2016-05-23 14:06:17 UTC
ruby-2.3.1-56.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-027a56273c

Comment 9 Fedora Update System 2016-05-24 02:55:23 UTC
ruby-2.3.1-56.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-027a56273c

Comment 10 Fedora Update System 2016-05-25 20:01:41 UTC
ruby-2.3.1-56.fc24 has been pushed to the Fedora 24 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.