Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73525 - ruby-irb - wrong dependencies?

Attached to Project: Community Packages
Opened by Herbert J. Skuhra (zapata) - Thursday, 27 January 2022, 08:57 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 17 May 2023, 04:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

'pacman -S ruby-irb" does not install ruby-rdoc and without it running irb produces the following error:

<internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rdoc (LoadError)
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/input-method.rb:17:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `<top (required)>'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/exe/irb:9:in `<top (required)>'
from /usr/bin/irb:25:in `load'
from /usr/bin/irb:25:in `<main>'

I guess the following patch would resolve this issue:

index 24b3dbeffd33..0304cd67177c 100644
--- a/ruby-irb/trunk/PKGBUILD
+++ b/ruby-irb/trunk/PKGBUILD
@@ -8,8 +8,7 @@ pkgdesc="Interactive Ruby command-line tool for REPL (Read Eval Print Loop)."
arch=('any')
url='https://github.com/ruby/irb'
license=('BSD-2')
-depends=('ruby' 'ruby-reline')
-makedepends=('ruby-rdoc')
+depends=('ruby' 'ruby-reline' 'ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")


This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 17 May 2023, 04:27 GMT
Reason for closing:  Fixed
Comment by Herbert J. Skuhra (zapata) - Thursday, 27 January 2022, 10:37 GMT
Sorry, my patch is obviously wrong. Because afterwards

# pacman -R ruby-irb
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing ruby-irb breaks dependency 'ruby-irb' required by ruby
Comment by Stanimir (korikori) - Monday, 31 January 2022, 13:23 GMT
Can't confirm on the patch, but came here to confirm this issue - irb won't run without ruby-rdoc, thus it should be a dependency.
Comment by Daniel Wilhelm (shieldwed) - Friday, 04 February 2022, 17:47 GMT
`ruby` and `ruby-irb` already depend on each other, so this cycle was not introduced by this patch. So essentially `ruby-rdoc` needs to be a dependency to `ruby-irb` too. Without it `ruby-rdoc` needs to be explicitly installed to have a working irb shell.
Comment by Tim (bastelfreak) - Sunday, 13 February 2022, 10:31 GMT
I think the actual issue is that usually rdoc is packaged with ruby. That's the upstream default. On Arch Linux, ruby and ruby-rdoc are two packages. Gem maintainers assume rdoc is provided by ruby itself so it's often not listed as a dependency in the gemspec file.
Comment by Anatol Pomozov (anatolik) - Wednesday, 16 February 2022, 17:13 GMT
The request sounds reasonable.

Added ruby-rdoc as a dependency of ruby-irb. Merged it to SVN as rev 1133488. The dependency change will be available with the next package build.

Loading...