Created attachment 294817 [details] Patch for toolchain.eclass and toolchain-binutils.eclass Portage's ebuild.sh now contains: # These dummy functions return false, in order to ensure that # `use multislot` is false for the "depend" phase. for x in use useq usev ; do eval "${x}() { return 1; }" done This means that 'use multislot' called in global scope of toolchain.eclass and toolchain-binutils.eclass always returns false and multislot functionality is always disabled. I suggest to replace "multislot" USE flag with TOOLCHAIN_MULTISLOT variable, which can be set using e.g. /etc/make.conf or /etc/portage/package.env. I'm attaching the patch for toolchain.eclass and toolchain-binutils.eclass.
things seem to work fine for me: $ cat /var/db/pkg/sys-devel/gcc-4.6.2/SLOT x86_64-pc-linux-gnu-4.6.2 $ cat /var/db/pkg/sys-devel/binutils-2.22/SLOT x86_64-pc-linux-gnu-2.22 so unless things aren't working for you, i don't intend on "fixing" this
Which version of Portage do you use?
What is printed for you by the following commands?: $ python -c 'import portage; dbapi = portage.db["/"]["porttree"].dbapi; print(dbapi.match("sys-devel/binutils:0"))' $ $ python -c 'import portage; dbapi = portage.db["/"]["porttree"].dbapi; print(dbapi.match("sys-devel/binutils:x86_64-pc-linux-gnu-2.22"))'
The dummy definition of use() only applies in the depend phase. In all other phases, the real function from phase-helpers.sh is used. So, the cached metadata values end up being screwy. I think vapier is already aware of that.
yes, the cache as published by the rsync server will not match what the user needs on their end system when they're using USE=multislot. but portage recovers fine afaict and updates the SLOT to the right value (albeit with a QA warning of sorts as the SLOT value changed).
I think a possible advantage to using a separate variable in make.conf (like TOOLCHAIN_MULITSLOT) would be that emerge --regen would (re)generate a "valid" cache entry for people with it enabled.
I don't use rsync server. I currently have sys-devel/binutils-2.22:0 installed and no other slots. If I enable "multislot" USE flag and touch eclasses to force regeneration of metadata, then: # USE="multislot" emerge -pv =sys-devel/binutils-2.21 These are the packages that would be merged, in order: [ebuild UD ] sys-devel/binutils-2.21 [2.22] USE="multislot* nls zlib -multitarget -static-libs -test -vanilla" 0 kB Total: 1 package (1 downgrade), Size of downloads: 0 kB # As you can see, Portage wants to replace installed sys-devel/binutils-2.22 with sys-devel/binutils-2.21. If a separate variable was used during generation of metadata, then Portage would know about other slots.