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"
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.
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?
I have the exact results as the reporter and comfirm his comment #2. Something else is messed up here.
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?
I have gvim 6.2-r3 installed, and I do not have ruby-dbi installed.
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.
I guess a possible solution is to bump Ruby 1.8.0 into stable? It seems to be working pretty well for me...
or to put Ruby-1.8 in the same SLOT as 1.6 ?
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
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.
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?
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...
Okay, so like you said in comment #10, this appears to be a portage bug.
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.
Created attachment 20772 [details, diff] patch against portage.py
I think nakano's suggestion in comment #14 would be excellent.
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
There is another patch for this feature on bug 27965 , can you compare your patch with that one ?
*** Bug 27965 has been marked as a duplicate of this bug. ***
This patch was included in cvs by carpaski. So I close this bug.