### 4.
ruby-libs.x86_64: W: dangling-symlink /usr/share/ruby/io
/usr/share/gems/gems/io-console-0.5.6/lib/io
The target of the symbolic link does not exist within this package or its file
based dependencies. Verify spelling of the link target and that the target is
included in a package in this package's dependency chain.
=>
This warning was a hint to find "another issue" to fix.
The issue is the directory entry `%{ruby_libdir}/io` is duplicated
between ruby-libs and rubygem-io-console RPM in ruby.spec.
Maybe the directory entry in ruby-libs should be removed like this.
```
@@ -942,6 +942,7 @@ MSPECOPTS=""
# Platform independent libraries.
%dir %{ruby_libdir}
%exclude %{ruby_libdir}/bigdecimal*
+%exclude %{ruby_libdir}/io
%exclude %{ruby_libdir}/irb*
%exclude %{ruby_libdir}/json*
%exclude %{ruby_libdir}/psych*
@@ -964,7 +965,6 @@ MSPECOPTS=""
%{ruby_libdir}/find.rb
%{ruby_libdir}/forwardable*
%{ruby_libdir}/getoptlong*
-%{ruby_libdir}/io
%{ruby_libdir}/ipaddr.rb
%{ruby_libdir}/kconv.rb
%{ruby_libdir}/logger*
```
For this issue, I actually found it by the following way.
```
$ rpm2cpio ruby-libs-3.0.0-146.fc35.x86_64.rpm | cpio -idmv
$ rpm2cpio rubygem-io-console-0.5.6-146.fc35.x86_64.rpm | cpio -idmv
...
cpio: ./usr/share/ruby/io not created: newer or same age version exists
...
```
The duplicated entry is only this entry. I checked it by the following script.
```
$ cat unpack.sh
#!/bin/bash
set -ex
for RPM_FILE in *.rpm; do
rpm2cpio "${RPM_FILE}" | cpio -idmv
done
```
I opened the ticket for rpmlint to ask them to implement to detect the
duplicated entries here.
https://github.com/rpm-software-management/rpmlint/issues/613
What do you think about these errors/warnings I reported on the email?
I am happy to send PR to fix it.
--
Jun | He - His - Him