FS#38411 - [ruby] Avoid conflicts between 'ruby' package and gem-based packages (rdoc, rake, ...)
Attached to Project:
Arch Linux
Opened by Anatol Pomozov (anatolik) - Tuesday, 07 January 2014, 20:23 GMT
Last edited by Anatol Pomozov (anatolik) - Wednesday, 13 May 2015, 19:56 GMT
Opened by Anatol Pomozov (anatolik) - Tuesday, 07 January 2014, 20:23 GMT
Last edited by Anatol Pomozov (anatolik) - Wednesday, 13 May 2015, 19:56 GMT
|
Details
Here is a discussion bug for the issue of conflicting ruby
gems that are shipped in 'ruby' package.
I am trying to install https://aur.archlinux.org/packages/ruby-rake/ and it fails: error: failed to commit transaction (conflicting files) ruby-rake: /usr/bin/rake exists in filesystem This comes from the fact that 'ruby' package already installs the gem with name 'rake'. In fact current version of ruby package installs following gems: bigdecimal-1.2.0 io-console-0.4.2 json-1.7.7 minitest-4.3.2 psych-2.0.0 rake-0.9.6 rdoc-4.0.0 test-unit-2.0.0.0 So packages like 'ruby-rdoc', 'ruby-rake' are both require and conflict with ruby, thus they are useful only for non MRI ruby distros (like rubinius). There should be a way to avoid conflicts like this, I see following solutions: 1) remove conflicting files (like those in /usr/bin/) from PKGBUILD and hope that we'll not have conflicts in /usr/lib/ruby/gems/2.0.0/gems/ (i.e. version in PKGBUILD will not match one in ruby package). Not very reliable solution. 2) add 'ruby-rake', 'ruby-rdoc'.... to provide=() and conflicts=() of 'ruby' package. 3) do not install gems in 'ruby' package and instead let users install gems via PKGBUILD. For me it seems better to contact upstream and request #3 meanwhile use #2. But I would like to hear the maintainer opinion. |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Wednesday, 13 May 2015, 19:56 GMT
Reason for closing: Won't implement
Wednesday, 13 May 2015, 19:56 GMT
Reason for closing: Won't implement
I see the packages you listed as part of the standard ruby experience [1].
Therefore options 1 and 3 aren't a good solution.
I will look into adding provides and conflicts for the packages listed.
[1] http://www.ruby-doc.org/stdlib-2.1.0/
Even #2 has it's own problems. e.g. current ruby package installs json-1.7.7. If 'ruby' will provide 'ruby-json' it means users will not be able to install https://aur.archlinux.org/packages/ruby-json that currently a newer version (1.8.1). What if someone needs this version, not the old one from 'ruby'? At this point I have no clear solution for this problem....
wrt #1 I meant remove /usr/bin/* files from conflicting AUR packages like ruby-rdoc, ruby-rake,
/usr/bin/ files are not the only one that can conflict. Other files are /usr/lib/ruby/gems/2.0.0/gems/ in case if version in ruby package matches version from PKGBUILD.
I'll contact upstream and try to discuss this question with them. I think the best way to solve the problem is to avoid installing any gems in 'ruby' package. If users needs gems (rake rdoc ...) it can
be easily installed from ruby-*. Or create a package group called 'ruby' that installs MRI+required gems.
BTW there is no need to rename binary files. These binaries are simple wrappers and the same for all versions, so the wrappers in /usr/bin can be easily removed from PKGBUILD.