In (at least) portage=2.2_rc67, the typical bash script syntax use multislot && SLOT="2" || SLOT="0" is not properly assigning the SLOT variable. The ebuild I noticed this in was sys-boot/grub-1.98: ------------ ceres ~ # USE="multislot" emerge -uvp =grub-1.98 These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ] sys-boot/grub-1.98 [0.97-r9] USE="-custom-cflags -debug% multislot%* (-ncurses%*) (-netboot%) -static truetype%*" 2,392 kB [ebuild N ] dev-lang/ruby-1.8.7_p249 USE="berkdb -debug doc emacs -examples gdbm -ipv6 -rubytests -socks5 ssl -threads -tk -xemacs" 0 kB [ebuild N ] app-emacs/ruby-mode-1.8.6 0 kB [ebuild N ] app-admin/eselect-ruby-20091225 0 kB [ebuild N ] dev-libs/lzo-2.02-r1 USE="-examples" 586 kB ------------ Note that the ebuild is not installing grub in a slot. Hard-coding the SLOT variable in the ebuild results in the proper slotting behavior: ------------ ceres ~ # USE="multislot" emerge -uvp =grub-1.98 These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild NS ] sys-boot/grub-1.98 [0.97-r9] USE="-custom-cflags -debug multislot -static truetype" 2,392 kB -------------
Created attachment 229167 [details] My emerge --info
It works, but since USE=multislot violates established rules about "constant metadata", cached SLOT value differs from the SLOT value that you will actually get once the package is installed. There is nothing portage can do about this except to implement an extension such as bug #174407. This issue is probably worthy of a FAQ entry since it's very confusing for users.
I've added a faq entry for this: http://www.gentoo.org/proj/en/portage/doc/faq.xml#doc_chap1_sect7
Zac, Thanks for that clear explanation. Closing this bug as RESOLVED/LATER. - John
I'll just dupe this against bug 174407 now so we don't have to dig it up later.
*** This bug has been marked as a duplicate of bug 174407 ***