Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32526 - emerge -uUp world tries to install Ruby-1.6.8-r2 despite Ruby-1.8.0 being installed
Summary: emerge -uUp world tries to install Ruby-1.6.8-r2 despite Ruby-1.8.0 being ins...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
: 27965 (view as bug list)
Depends on:
Blocks: 32589
  Show dependency tree
 
Reported: 2003-11-02 01:27 UTC by Farrel Lifson
Modified: 2011-10-30 22:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against portage.py (bugs.32526.patch,4.36 KB, patch)
2003-11-14 23:34 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch against portage.py (bugs.32526.patch,4.57 KB, patch)
2003-11-17 04:27 UTC, Masatomo Nakano (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Farrel Lifson 2003-11-02 01:27:24 UTC
emerge -uUp world produces:
asgard root # emerge -uUp world
                                                                                
These are the packages that I would merge, in order:
                                                                         
Calculating world dependencies ...done!
[ebuild  N    ] dev-lang/ruby-1.6.8-r2

However already have Ruby 1.8 installed:
asgard root # ruby -v
ruby 1.8.0 (2003-08-04) [i686-linux-gnu]

Notice that the installation is marked as 'N' not as 'D'.

Reproducible: Always
Steps to Reproduce:
1. emerge -uUp world
2.
3.

Actual Results:  
Wants to install ruby-1.6.8-r2

Expected Results:  
Nothing

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r2)
=================================================================
System uname: 2.4.20-gentoo-r2 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="ftp://ftp.is.co.za/linux/distributions/gentoo 
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.rucus.ru.ac.za/gentoo-portage"
USE="apm avi crypt encode foomaticdb gif jpeg libg++ mad mikmod mpeg nls png
spell xmms xv zlib gdbm slang readline svga java guile sdl gpm tcpd pam libwww
ssl perl imlib oggvorbis motif mozilla X gtk gnome alsa esd bonobo cups curl doc
evo gd gtk2 gtkhtml mmx 3dnow ncurses pdflib quicktime ruby tcltk tetex truetype
oss usb xml xml2 x86 python opengl svg -arts -berkdb -qt -kde"
Comment 1 Henrik Sankala 2003-11-02 08:43:32 UTC
It says 'N' because it wants to install 1.6.8-r2 into a new slot (1.6), not
downgrade ruby 1.8.0.

It wants to do this because some package on your system depends on ruby 1.6
(use 'qpkg -q dev-lang/ruby-1.6' to find out which). Maybe you can upgrade
that package to a version that is marked as working with 1.8.0.
Comment 2 Farrel Lifson 2003-11-02 09:10:22 UTC
qpkg doesn't show any dependencies

asgard root # qpkg -q dev-lang/ruby-1.6.8-r2
asgard root #
asgard root # qpkg -q dev-lang/ruby-1.6
asgard root #
asgard root # qpkg -q dev-lang/ruby-1.6.8
asgard root #

Any other ideas?
Comment 3 Kurt Hindenburg 2003-11-03 09:07:41 UTC
I have the exact results as the reporter and comfirm his comment #2.  Something
else is messed up here.
Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-03 13:29:58 UTC
If you run `etcat -d dev-lang/ruby-1.6` you will get a list of packages thatdepends
on ruby-1.6. Here I found dev-lang/ruby-dbi and app-editors/vim-6.1, so I
guess you have one of these installed, don't you?
Comment 5 Farrel Lifson 2003-11-03 13:38:52 UTC
I have gvim 6.2-r3 installed, and I do not have ruby-dbi installed.
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-04 10:37:52 UTC
Right... I can reproduce the bug and think it is a Portage one rather
than Ruby. If the package is listed in /var/cache/edb/world and you
only installed unstable version of SLOT'd package, emerge -Uu tries to
install stable version of the package on another SLOT. If the stable
version of the package is in the same SLOT with unstable version, it
doesn't show any candidate. Also, if there is only unstable version
of the package available even though they have different SLOTs,
Portage doesn't complain. Portage shows 'N' of the package only when
they have different SLOTs, there are stable and unstable versions,
you only installed unstable version, you list the package name to
/var/cache/edb/world and your ACCEPTED_KEYWORDS points to stable.
Comment 7 Farrel Lifson 2003-11-04 10:51:49 UTC
I guess a possible solution is to bump Ruby 1.8.0 into stable? It seems to
be working pretty well for me...
Comment 8 Farrel Lifson 2003-11-04 11:04:50 UTC
or to put Ruby-1.8 in the same SLOT as 1.6 ?
Comment 9 adam morley 2003-11-04 15:59:35 UTC
FWIW, I get:

-bash-2.05b# emerge -puD world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild     U ] net-misc/dhcpcd-1.3.22_p4-r2 [1.3.22_p4-r1] 
[ebuild     U ] dev-lang/python-2.2.3-r5 [2.2.3-r1] 
[ebuild     UD] media-sound/alsa-driver-0.9.2 [0.9.7-r3] 
[ebuild  N    ] sys-kernel/gentoo-sources-2.4.20-r8  
[ebuild  N    ] dev-lang/ruby-1.6.8-r2  
[ebuild     U ] net-mail/mutt-1.5.4-r1 [1.4.1-r1] 
[ebuild     UD] net-www/publicfile-0.52 [0.52-r1] 

-bash-2.05b# pkglist|grep ruby
dev-lang/ruby-1.6.8-r1
-bash-2.05b# emerge -pu world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild  N    ] sys-kernel/gentoo-sources-2.4.20-r8  
[ebuild  N    ] dev-lang/ruby-1.6.8-r2  
[ebuild     UD] media-sound/alsa-driver-0.9.2 [0.9.7-r3] 
[ebuild     U ] net-misc/dhcpcd-1.3.22_p4-r2 [1.3.22_p4-r1] 
[ebuild     U ] net-mail/mutt-1.5.4-r1 [1.4.1-r1] 
[ebuild     UD] net-www/publicfile-0.52 [0.52-r1] 
[ebuild     U ] dev-lang/python-2.2.3-r5 [2.2.3-r1] 

Which is weird (to me) because I would think ruby would be a U not N since
I've already got 1.6.8-r1 installed.  I briefly looked at forums, and didn't
see anything on this, so I thought I'd speak up.  The only comment I noticed
that might have an impact was "Added SLOT support and ruby18 local IUSE flag
to ruby-1.6.8-r2" in the changelog, but I didn't know what that meant.

Sorry if its not helpful,
adam
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-05 07:47:38 UTC
The problem won't be solved if I change 1.8 into stable as adam
suggested :( (And there is no point putting 1.8 as the same SLOT as
1.6 because they were int the same SLOT) 

I suppose this is a Portage bug. Gentoo Linux Developer HOWTO says:

  "Note: Using 0 as the SLOT value signifies that this package only has
  1 SLOT setting (in other words, this package is not SLOTable)."

Given that, an ebuild with SLOT="0" shouldn't coexist with a different
version of the package with SLOT="1.6" and must be removed when any
other package which has differnt SLOT is installed.

Workaround to the problem is to unmerge <=ruby-1.6.8-r1 or <=ruby-1.8.0
first and then merge ruby-1.6.8-r2 and/or >=ruby-1.8.0-r1 (I didn't
post it to forum but gentoo-dev list). You will see a notice when you
try to upgrade to ruby-1.6.8-r2 or >=ruby-1.8.0-r1.
Comment 11 Aron Griffis (RETIRED) gentoo-dev 2003-11-10 11:51:08 UTC
Usata,

How about changing the ruby ebuilds so that the slotted versions DEPEND on
the older versions not being installed?  Wouldn't that force the user to
remove the older version prior to installing the new version?
Comment 12 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-10 22:55:06 UTC
It doesn't help. Even if I add DEPEND="!<dev-lang/ruby-1.8.0"
ruby-1.6.8-r2 is still considered as an 'N' package.  It looks ebuilds
simply ignore any DEPEND block wrt themselves...
Comment 13 Aron Griffis (RETIRED) gentoo-dev 2003-11-11 05:10:01 UTC
Okay, so like you said in comment #10, this appears to be a portage bug.
Comment 14 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-14 23:33:47 UTC
I talked with carpaski about this bug and we decided to add a 'slotmove' feature to portage.
It means we can tell portage to change SLOT in /var/db/*.

In this case,
package maintainer would change SLOT from 0 to 1.6 in ruby-1.6*.ebuild and 
add 'moveslot dev-lang/ruby 0 1.6" to profiles/updates/4Q-2003.
Then old version ebuild would be unmerged in next AUTOCLEAN.

I think this feature would fix this bug.
Comment 15 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-14 23:34:25 UTC
Created attachment 20772 [details, diff]
patch against portage.py
Comment 16 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-16 09:45:15 UTC
I think nakano's suggestion in comment #14 would be excellent.
Comment 17 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-17 04:27:12 UTC
Created attachment 20855 [details, diff]
patch against portage.py

I just improved the patch.
It can use this syntax:
  slotmove <=cat/pkg-1.2.3 0 1.2

Thanks,
Masatomo
Comment 18 Marius Mauch (RETIRED) gentoo-dev 2003-11-24 21:42:23 UTC
There is another patch for this feature on bug 27965 , can you compare your patch with that one ?
Comment 19 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-26 03:46:47 UTC
*** Bug 27965 has been marked as a duplicate of this bug. ***
Comment 20 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-29 11:54:32 UTC
This patch was included in cvs by carpaski.
So I close this bug.