Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317215 - sys-apps/portage-2.2_rc67 - Typical multislot USE flag handling not working
Summary: sys-apps/portage-2.2_rc67 - Typical multislot USE flag handling not working
Status: RESOLVED DUPLICATE of bug 174407
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 02:25 UTC by John R. Graham
Modified: 2010-04-26 18:40 UTC (History)
0 users

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


Attachments
My emerge --info (1.txt,11.04 KB, text/plain)
2010-04-26 02:26 UTC, John R. Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John R. Graham gentoo-dev 2010-04-26 02:25:38 UTC
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
-------------
Comment 1 John R. Graham gentoo-dev 2010-04-26 02:26:48 UTC
Created attachment 229167 [details]
My emerge --info
Comment 2 Zac Medico gentoo-dev 2010-04-26 03:21:22 UTC
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.
Comment 3 Zac Medico gentoo-dev 2010-04-26 03:55:52 UTC
I've added a faq entry for this:

http://www.gentoo.org/proj/en/portage/doc/faq.xml#doc_chap1_sect7
Comment 4 John R. Graham gentoo-dev 2010-04-26 17:58:21 UTC
Zac,

Thanks for that clear explanation.  Closing this bug as RESOLVED/LATER.

- John
Comment 5 Zac Medico gentoo-dev 2010-04-26 18:40:40 UTC
I'll just dupe this against bug 174407 now so we don't have to dig it up later.
Comment 6 Zac Medico gentoo-dev 2010-04-26 18:40:58 UTC

*** This bug has been marked as a duplicate of bug 174407 ***