installing `ruby2.0` results in ruby 1.9.3-p484 as default version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ruby2.0 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I expected that installing the "ruby2.0" package explicitly, I would get ruby 2.0 as my default version. However, due to the dependency tree of the ruby2.0 package, version 1.9.3-p484 is the default version instead.
ubuntu@ruby20:~$ apt-cache depends ruby2.0
ruby2.0
...
Depends: ruby
ubuntu@ruby20:~$ apt-cache depends ruby
ruby
Depends: ruby1.9.1
ubuntu@ruby20:~$ sudo apt-get install ruby2.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ca-certificates libjs-jquery libruby1.9.1 libruby2.0 libyaml-0-2 openssl ruby ruby1.9.1 rubygems-
Suggested packages:
javascript-common ri ruby-dev ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev ruby-switch bundler
The following NEW packages will be installed:
ca-certificates libjs-jquery libruby1.9.1 libruby2.0 libyaml-0-2 openssl ruby ruby1.9.1 ruby2.0 rubygems-
0 upgraded, 10 newly installed, 0 to remove and 104 not upgraded.
Need to get 0 B/6,377 kB of archives.
After this operation, 28.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
....snip
ubuntu@ruby20:~$ which ruby
/usr/bin/ruby
ubuntu@ruby20:~$ ls -l /usr/bin/ruby
lrwxrwxrwx 1 root root 9 Feb 14 21:22 /usr/bin/ruby -> ruby1.9.1
ubuntu@ruby20:~$ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
It appears upstream (Debian) Ruby package changed this during the Trusty freeze:
ruby-defaults (1:2.0.0.1~exp3) experimental; urgency=medium
* ruby-all-dev: migrate from Ruby 1.9.1 and 2.0 to Ruby 2.0 and 2.1 Conflicts/ Replaces against old interpreter packages
* ruby: remove Breaks/
as this will force the removal of old interpreters from users' systems
(Closes: #740733)
.
The following upgrade scenarios from wheezy were tested, still work fine,
and leave the old interpreters alone:
- ruby
- ruby + ruby1.8
- ruby + apt-listbugs
- ruby + ruby1.8 + apt-listbugs
- ruby1.8 + apt-listbugs
-- Antonio Terceiro <email address hidden> Sat, 29 Mar 2014 16:12:05 -0300
Is it possible to integrate these changes into Ubuntu so that the package installation behaves as a user expects? I can't imagine anyone who wants "ruby2.0" would expect ruby 1.9.1/1.9.3-p484, especially as the default version.
Yes, update-alternatives is a thing, but this is an extra step which should not be necessary.