Bug 193195 - lang/ruby21 deleted lang/ruby19
Summary: lang/ruby21 deleted lang/ruby19
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-31 09:09 UTC by gja822
Modified: 2014-09-02 01:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gja822 2014-08-31 09:09:56 UTC
uname: FreeBSD --- 9.3-RELEASE FreeBSD 9.3-RELEASE #5 r270286M amd64

I'm updgrading ports and I had these lines in pkg version output:
ruby-1.9.3.547,1                   <   needs updating (index has 1.9.3.547_1,1)
ruby21-2.1.2,1                     <   needs updating (index has 2.1.2_1,1)

Trying to upgrade the latter got "install error". Then I manually typed from lang/ruby21 "make deinstall", I saw that not ruby21, but ruby19 was deinstalling!
I have DEFAULT_VERSIONS ruby=2.1 in make.conf.
Now  I can't deinstall ruby21 ("which is in conflict with ruby-2.1"). If I try to "pkg delete ruby21-2.1.2,1" I'll have to delete a huge bunch of dependant packages, that is not I want, unless I could easily reinstall them.

Something is definitely wrong.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-31 09:20:44 UTC
assign to ruby@, cc pkg@
Comment 2 Steve Wills freebsd_committer freebsd_triage 2014-08-31 14:16:21 UTC
(In reply to gja822 from comment #0)
> uname: FreeBSD --- 9.3-RELEASE FreeBSD 9.3-RELEASE #5 r270286M amd64
> 
> I'm updgrading ports and I had these lines in pkg version output:
> ruby-1.9.3.547,1                   <   needs updating (index has
> 1.9.3.547_1,1)
> ruby21-2.1.2,1                     <   needs updating (index has 2.1.2_1,1)
> 
> Trying to upgrade the latter got "install error". 

Would need more detail on the exact error message.

> Then I manually typed from
> lang/ruby21 "make deinstall", I saw that not ruby21, but ruby19 was
> deinstalling!
> I have DEFAULT_VERSIONS ruby=2.1 in make.conf.

Seeing "ruby-1.9.3.547,1" instead of "ruby19-1.9.3.547,1" tells me that ruby 1.9 *was* your default ruby when you installed it. Having DEFAULT_VERSIONS=ruby=2.1 then running "make deinstall" in lang/ruby21, which was currently set to default, tries to uninstall your default ruby, which in this case was 1.9. So this actually isn't surprising and I'm not sure it's incorrect.

> Now  I can't deinstall ruby21 ("which is in conflict with ruby-2.1").

Would need to see the detailed error message on this.

> If I
> try to "pkg delete ruby21-2.1.2,1" I'll have to delete a huge bunch of
> dependant packages, that is not I want, unless I could easily reinstall them.

This is just a side effect of having changed your default ruby. If we had ever had it so that the default ruby was only used at build time and all packages had the version suffix (19,20,21), you may not have this problem. But currently, changing default ruby version doesn't work this way.

> Something is definitely wrong.

I'm not so sure. I think this is just related to changing your default ruby version.
Comment 3 gja822 2014-08-31 16:19:26 UTC
Thanks for reply. But I've followed all instructions in ports/UPDATING from 20130527 and later (and much earlier), so I hadn't expected such behaviour.
I had 1.9 as default for a long time, till AFAIR 20130527 (when I made ruby=2.1 in make.conf instead of DEFAULT_RUBY_VER=1.9 or smth similar). After that I had no such problems. (But, I suppose, some other port(s) ignored that line in make.conf and reinstalled ruby-1.9).
Well, from lang/ruby21 directory first time I made deinstall (which deleted previously upgraded ruby-1.9 version) and afterwards I couldn't make install ("ruby-2.1 and ruby21-2.1 conflict" since installing in the same place).
O.K., may be it's not wrong, but some recommendations on changing default versions or something like that would be useful.
I've finally pkg delete'd wrong "ruby21" version with dependants and reinstalled all afterwards manually, so I cannot reproduce any more.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-08-31 21:29:58 UTC
(In reply to gja822 from comment #3)
> Thanks for reply. But I've followed all instructions in ports/UPDATING from
> 20130527 and later (and much earlier), so I hadn't expected such behaviour.
> I had 1.9 as default for a long time, till AFAIR 20130527 (when I made
> ruby=2.1 in make.conf instead of DEFAULT_RUBY_VER=1.9 or smth similar).
> After that I had no such problems. (But, I suppose, some other port(s)
> ignored that line in make.conf and reinstalled ruby-1.9).

If you had:

ruby-1.9.3.547,1

and:

ruby21-2.1.2,1

installed, ruby 1.9 was your default ruby, not 2.1.

If 2.1 was default, you would have had:

ruby-2.1.2

and perhaps:

ruby19-1.9.3.547,1

The one without the suffix in the name is the default one.

> Well, from lang/ruby21 directory first time I made deinstall (which deleted
> previously upgraded ruby-1.9 version) and afterwards I couldn't make install
> ("ruby-2.1 and ruby21-2.1 conflict" since installing in the same place).
> O.K., may be it's not wrong, but some recommendations on changing default
> versions or something like that would be useful.

When changing the default version, you have to at least reinstall all versions of ruby that are installed. 

> I've finally pkg delete'd wrong "ruby21" version with dependants and
> reinstalled all afterwards manually, so I cannot reproduce any more.

Ok, in that case I'm going to be unable to solve this issue, so I propose we close this bug. Thanks for the report, if similar issues come up, I'll take a look.